opentelemetry-exporter-otlp 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fb745d3f75cb361d8921375fac3d93c4ba439b04f6e1b88a16a3e1d37c0718b
4
- data.tar.gz: c03ac82d66dba1f2d18c15c33e58067fc634d17dac61a390e92f965f1a3aed8c
3
+ metadata.gz: 5f04f44504dc7f282168af4aeea6b08f8e010cdf50aa3352d604d4c689a84f96
4
+ data.tar.gz: d70caacf75e05a78dc0ae2e81c8ae1acca2aa4a47b0b47a4c69d9f1aaa4b5e40
5
5
  SHA512:
6
- metadata.gz: 1a215680796d45dacf04484864b07f1552f1cae9f1b4c9e73ffc5392bfb8e370a3bca9abea9155cd53b14bb9ad9d923ce9b8659fdec21dbbdceb4bef05832258
7
- data.tar.gz: 5261a436acd2d12465c3b18100e0b6202f66bdfd633ba19f7c244a1dc38a67deca69a4c6a6110f473f286e39ed4392b908f9414dd4c84217abf9582a08392ec2
6
+ metadata.gz: f735a7ddf73deba7d4e1708a01a19fc0deccb0869e5ec87d080d3bbabfb97e609cb2889766219ed0f611dad94097c5de87b7e7ff74d6e023d1f473aff098ad9c
7
+ data.tar.gz: 7c2519a847240f89ebac52d2bd007364e197216017d8d996808eca9445c1b2748ae5feef9d4f05694ccc319aa9ae5c8d73ca26daf52d9b4d4fe5e5262ff4d09a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-exporter-otlp
2
2
 
3
+ ### v0.23.0 / 2022-06-23
4
+
5
+ * ADDED: Report bundle size stats in exporter; also don't re-gzip unnecessarily
6
+
3
7
  ### v0.22.0 / 2022-06-09
4
8
 
5
9
  * ADDED: Otlp grpc
@@ -131,23 +131,28 @@ module OpenTelemetry
131
131
  OpenTelemetry::Common::Utilities.untraced { yield }
132
132
  end
133
133
 
134
- def send_bytes(bytes, timeout:) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
134
+ def send_bytes(bytes, timeout:) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
135
135
  return FAILURE if bytes.nil?
136
136
 
137
+ @metrics_reporter.record_value('otel.otlp_exporter.message.uncompressed_size', value: bytes.bytesize)
138
+
139
+ request = Net::HTTP::Post.new(@path)
140
+ if @compression == 'gzip'
141
+ request.add_field('Content-Encoding', 'gzip')
142
+ body = Zlib.gzip(bytes)
143
+ @metrics_reporter.record_value('otel.otlp_exporter.message.compressed_size', value: body.bytesize)
144
+ else
145
+ body = bytes
146
+ end
147
+ request.body = body
148
+ request.add_field('Content-Type', 'application/x-protobuf')
149
+ @headers.each { |key, value| request.add_field(key, value) }
150
+
137
151
  retry_count = 0
138
152
  timeout ||= @timeout
139
153
  start_time = OpenTelemetry::Common::Utilities.timeout_timestamp
140
- around_request do # rubocop:disable Metrics/BlockLength
141
- request = Net::HTTP::Post.new(@path)
142
- request.body = if @compression == 'gzip'
143
- request.add_field('Content-Encoding', 'gzip')
144
- Zlib.gzip(bytes)
145
- else
146
- bytes
147
- end
148
- request.add_field('Content-Type', 'application/x-protobuf')
149
- @headers.each { |key, value| request.add_field(key, value) }
150
154
 
155
+ around_request do # rubocop:disable Metrics/BlockLength
151
156
  remaining_timeout = OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time)
152
157
  return FAILURE if remaining_timeout.zero?
153
158
 
@@ -265,7 +270,7 @@ module OpenTelemetry
265
270
  true
266
271
  end
267
272
 
268
- def encode(span_data) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
273
+ def encode(span_data) # rubocop:disable Metrics/MethodLength
269
274
  Opentelemetry::Proto::Collector::Trace::V1::ExportTraceServiceRequest.encode(
270
275
  Opentelemetry::Proto::Collector::Trace::V1::ExportTraceServiceRequest.new(
271
276
  resource_spans: span_data
@@ -295,7 +300,7 @@ module OpenTelemetry
295
300
  nil
296
301
  end
297
302
 
298
- def as_otlp_span(span_data) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
303
+ def as_otlp_span(span_data) # rubocop:disable Metrics/MethodLength
299
304
  Opentelemetry::Proto::Trace::V1::Span.new(
300
305
  trace_id: span_data.trace_id,
301
306
  span_id: span_data.span_id,
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Exporter
9
9
  module OTLP
10
10
  ## Current OpenTelemetry OTLP exporter version
11
- VERSION = '0.22.0'
11
+ VERSION = '0.23.0'
12
12
  end
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-exporter-otlp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-09 00:00:00.000000000 Z
11
+ date: 2022-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -280,10 +280,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
280
280
  licenses:
281
281
  - Apache-2.0
282
282
  metadata:
283
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.22.0/file.CHANGELOG.html
283
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.23.0/file.CHANGELOG.html
284
284
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp
285
285
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
286
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.22.0
286
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.23.0
287
287
  post_install_message:
288
288
  rdoc_options: []
289
289
  require_paths: