opentelemetry-exporter-otlp 0.21.2 → 0.21.3

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: c65f900e34136a47b094481f79f762069d9b51f291e3af124d33fa831b70dc17
4
- data.tar.gz: 48727712b84ea084c0f007174283fdf17510d5f708d10da491fd61f5d5524cb0
3
+ metadata.gz: b213406e2d3c47187dfab98be6509f7622c45c18bea72bf256afc0b15ac96456
4
+ data.tar.gz: bda1a504619c2bb64f079fb136b7ddf40ea192476760ca9cbcd96df057779e88
5
5
  SHA512:
6
- metadata.gz: e360db9e6293a91eb5944f6752b93287385c2c2609454ef5b2a838eea6278b669fa5f28012836ca7d649196f6c108c4ad49231751c409b3d25f5ab40f79738a7
7
- data.tar.gz: 9ee5d32db05a6834a56f0603235ef8becdbc138b764f0112d2f2ae94860613effbfdd53297ed1a0df1bbca81bae1392ede6883f1279aaa4610ca4deaf253867c
6
+ metadata.gz: e30faf8e6a0c5b122fa28882482d9c03286e601bb65653937133e15c23802a495fc572f8470a1f2b1e42a45839031e31e20053a1a3e87d6d311c2243b64f604a
7
+ data.tar.gz: ad5469012f495a86f0e8ae40016cd12e06f51be4d126e09b9f7b201cbd11011003886ba12b424802cfa7c9c6d0b5756b03bf4c0a8ce51f895836d7c58965fba5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-exporter-otlp
2
2
 
3
+ ### v0.21.3 / 2022-05-12
4
+
5
+ * (No significant changes)
6
+
3
7
  ### v0.21.2 / 2022-01-19
4
8
 
5
9
  * FIXED: Default scheme for OTLP endpoint
data/README.md CHANGED
@@ -78,7 +78,7 @@ The collector exporter can be configured explicitly in code, or via environment
78
78
  | `ssl_verify_mode:` | `OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_PEER` or | `OpenSSL::SSL:VERIFY_PEER` |
79
79
  | | `OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_NONE` | |
80
80
 
81
- `ssl_verify_mode:` parameter values should be flags for server certificate verification: `OpenSSL::SSL:VERIFY_PEER` and `OpenSSL::SSL:VERIFY_NONE` are acceptable. These values can also be set using the appropriately named environment variables as shown where `VERIFY_PEER` will take precedence over `VERIFY_NONE`. Please see [the Net::HTTP docs](https://ruby-doc.org/stdlib-2.5.1/libdoc/net/http/rdoc/Net/HTTP.html#verify_mode) for more information about these flags.
81
+ `ssl_verify_mode:` parameter values should be flags for server certificate verification: `OpenSSL::SSL:VERIFY_PEER` and `OpenSSL::SSL:VERIFY_NONE` are acceptable. These values can also be set using the appropriately named environment variables as shown where `VERIFY_PEER` will take precedence over `VERIFY_NONE`. Please see [the Net::HTTP docs](https://ruby-doc.org/stdlib-2.7.6/libdoc/net/http/rdoc/Net/HTTP.html#verify_mode) for more information about these flags.
82
82
 
83
83
  ## How can I get involved?
84
84
 
@@ -10,6 +10,8 @@ require 'net/http'
10
10
  require 'csv'
11
11
  require 'zlib'
12
12
 
13
+ require 'google/rpc/status_pb'
14
+
13
15
  require 'opentelemetry/proto/common/v1/common_pb'
14
16
  require 'opentelemetry/proto/resource/v1/resource_pb'
15
17
  require 'opentelemetry/proto/trace/v1/trace_pb'
@@ -185,8 +187,7 @@ module OpenTelemetry
185
187
  redo if backoff?(retry_count: retry_count += 1, reason: response.code)
186
188
  FAILURE
187
189
  when Net::HTTPBadRequest, Net::HTTPClientError, Net::HTTPServerError
188
- # TODO: decode the body as a google.rpc.Status Protobuf-encoded message when https://github.com/open-telemetry/opentelemetry-collector/issues/1357 is fixed.
189
- response.body # Read and discard body
190
+ log_status(response.body)
190
191
  @metrics_reporter.add_to_counter('otel.otlp_exporter.failure', labels: { 'reason' => response.code })
191
192
  FAILURE
192
193
  when Net::HTTPRedirection
@@ -231,6 +232,17 @@ module OpenTelemetry
231
232
  # TODO: figure out destination and reinitialize @http and @path
232
233
  end
233
234
 
235
+ def log_status(body)
236
+ status = Google::Rpc::Status.decode(body)
237
+ details = status.details.map do |detail|
238
+ klass_or_nil = ::Google::Protobuf::DescriptorPool.generated_pool.lookup(detail.type_name).msgclass
239
+ detail.unpack(klass_or_nil) if klass_or_nil
240
+ end.compact
241
+ OpenTelemetry.handle_error(message: "OTLP exporter received rpc.Status{message=#{status.message}, details=#{details}}")
242
+ rescue StandardError => e
243
+ OpenTelemetry.handle_error(exception: e, message: 'unexpected error decoding rpc.Status in OTLP::Exporter#log_status')
244
+ end
245
+
234
246
  def measure_request_duration
235
247
  start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
236
248
  begin
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Exporter
9
9
  module OTLP
10
10
  ## Current OpenTelemetry OTLP exporter version
11
- VERSION = '0.21.2'
11
+ VERSION = '0.21.3'
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.21.2
4
+ version: 0.21.3
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-01-19 00:00:00.000000000 Z
11
+ date: 2022-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.7'
19
+ version: '3.19'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.7'
26
+ version: '3.19'
27
+ - !ruby/object:Gem::Dependency
28
+ name: googleapis-common-protos-types
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: opentelemetry-api
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +80,20 @@ dependencies:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
82
  version: '1.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: opentelemetry-semantic_conventions
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: bundler
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +136,20 @@ dependencies:
108
136
  - - "~>"
109
137
  - !ruby/object:Gem::Version
110
138
  version: '5.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: opentelemetry-test-helpers
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
111
153
  - !ruby/object:Gem::Dependency
112
154
  name: pry-byebug
113
155
  requirement: !ruby/object:Gem::Requirement
@@ -238,10 +280,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
238
280
  licenses:
239
281
  - Apache-2.0
240
282
  metadata:
241
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.21.2/file.CHANGELOG.html
283
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.21.3/file.CHANGELOG.html
242
284
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp
243
285
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
244
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.21.2
286
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.21.3
245
287
  post_install_message:
246
288
  rdoc_options: []
247
289
  require_paths:
@@ -250,7 +292,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
292
  requirements:
251
293
  - - ">="
252
294
  - !ruby/object:Gem::Version
253
- version: 2.5.0
295
+ version: 2.6.0
254
296
  required_rubygems_version: !ruby/object:Gem::Requirement
255
297
  requirements:
256
298
  - - ">="