opentelemetry-exporter-otlp 0.18.0 → 0.19.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: b48dea168895acc1c5cb835efd2b3691265c616b8ca19ccfcbc9f2a3b88048fd
4
- data.tar.gz: 2ba8c745c8572195935ad47a48583e6f0dc669c3d441d5fa2d263a151de0036d
3
+ metadata.gz: bf50130d2b4ab1fb492992a5b468988d1bbb404847f94820e46bd73b3beb9a25
4
+ data.tar.gz: dd4d624818f79259fe10c307e64441382d1e98e5304d89cf4ffac3d9290a42f2
5
5
  SHA512:
6
- metadata.gz: 47053b86edcc9a28e05064ffff4794fd61748c36b184b6afd2f7437ae9ecae2b5bbbe04fcbaaa9834b1f7105a56ee38be5577df232c4c26c6da5d802c48b1763
7
- data.tar.gz: 8341c6ef8db9541612d1ccac7c95cc9f1725224a716a86af045851843ca066ca47591f155460a5d2873236856979125be8faa7cc5b11789a7f692f683ad27da9
6
+ metadata.gz: e0f80a737f5afcde1670b73785043500eec3fbf7d6a37955485ed88b015a3d0dfef8ff52d4e6bc201b2b872bb3c2bf949edab618b4695296a139520486d1a546
7
+ data.tar.gz: 3c22ed15af7b272db9e09444af4aeeeea8ffedb19ec5fe7f35813ea357347166c6fc045820c1feb030f3901aa0520c047f858ee017a55d0d9726921d9c17d3d8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History: opentelemetry-exporter-otlp
2
2
 
3
+ ### v0.19.0 / 2021-06-03
4
+
5
+ * ADDED: Add a SSL verify mode option for the OTLP exporter
6
+ * FIXED: Handle OTLP exporter encoding exceptions
7
+ * DOCS: Remove the OTLP receiver legacy gRPC port(55680) references
8
+
3
9
  ### v0.18.0 / 2021-05-21
4
10
 
5
11
  * BREAKING CHANGE: Replace Time.now with Process.clock_gettime
data/README.md CHANGED
@@ -40,7 +40,7 @@ OpenTelemetry::SDK.configure do |c|
40
40
  c.add_span_processor(
41
41
  OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
42
42
  OpenTelemetry::Exporter::OTLP::Exporter.new(
43
- endpoint: 'http://localhost:55680'
43
+ compression: 'gzip'
44
44
  )
45
45
  )
46
46
  )
@@ -65,6 +65,22 @@ end
65
65
 
66
66
  For additional examples, see the [examples on github][examples-github].
67
67
 
68
+ ## How can I configure the OTLP exporter?
69
+
70
+ The collector exporter can be configured explicitly in code, as shown above, or via environment variables. The configuration parameters, environment variables, and defaults are shown below.
71
+
72
+ | Parameter | Environment variable | Default |
73
+ | ------------------- | -------------------------------------------- | ----------------------------------- |
74
+ | `endpoint:` | `OTEL_EXPORTER_OTLP_ENDPOINT` | `"http://localhost:4317/v1/traces"` |
75
+ | `certificate_file: `| `OTEL_EXPORTER_OTLP_CERTIFICATE` | |
76
+ | `headers:` | `OTEL_EXPORTER_OTLP_HEADERS` | |
77
+ | `compression:` | `OTEL_EXPORTER_OTLP_COMPRESSION` | |
78
+ | `timeout:` | `OTEL_EXPORTER_OTLP_TIMEOUT` | `10` |
79
+ | `ssl_verify_mode:` | `OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_PEER` or | `OpenSSL::SSL:VERIFY_PEER` |
80
+ | | `OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_NONE` | |
81
+
82
+ `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.
83
+
68
84
  ## How can I get involved?
69
85
 
70
86
  The `opentelemetry-exporter-otlp` gem source is [on github][repo-github], along with related gems including `opentelemetry-sdk`.
@@ -31,8 +31,19 @@ module OpenTelemetry
31
31
  WRITE_TIMEOUT_SUPPORTED = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6')
32
32
  private_constant(:KEEP_ALIVE_TIMEOUT, :RETRY_COUNT, :WRITE_TIMEOUT_SUPPORTED)
33
33
 
34
- def initialize(endpoint: config_opt('OTEL_EXPORTER_OTLP_TRACES_ENDPOINT', 'OTEL_EXPORTER_OTLP_ENDPOINT', default: 'https://localhost:4317/v1/traces'), # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
34
+ def self.ssl_verify_mode
35
+ if ENV.key?('OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_PEER')
36
+ OpenSSL::SSL::VERIFY_PEER
37
+ elsif ENV.key?('OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_NONE')
38
+ OpenSSL::SSL::VERIFY_NONE
39
+ else
40
+ OpenSSL::SSL::VERIFY_PEER
41
+ end
42
+ end
43
+
44
+ def initialize(endpoint: config_opt('OTEL_EXPORTER_OTLP_TRACES_ENDPOINT', 'OTEL_EXPORTER_OTLP_ENDPOINT', default: 'https://localhost:4317/v1/traces'), # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
35
45
  certificate_file: config_opt('OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE', 'OTEL_EXPORTER_OTLP_CERTIFICATE'),
46
+ ssl_verify_mode: Exporter.ssl_verify_mode,
36
47
  headers: config_opt('OTEL_EXPORTER_OTLP_TRACES_HEADERS', 'OTEL_EXPORTER_OTLP_HEADERS'),
37
48
  compression: config_opt('OTEL_EXPORTER_OTLP_TRACES_COMPRESSION', 'OTEL_EXPORTER_OTLP_COMPRESSION'),
38
49
  timeout: config_opt('OTEL_EXPORTER_OTLP_TRACES_TIMEOUT', 'OTEL_EXPORTER_OTLP_TIMEOUT', default: 10),
@@ -49,6 +60,7 @@ module OpenTelemetry
49
60
 
50
61
  @http = Net::HTTP.new(@uri.host, @uri.port)
51
62
  @http.use_ssl = @uri.scheme == 'https'
63
+ @http.verify_mode = ssl_verify_mode
52
64
  @http.ca_file = certificate_file unless certificate_file.nil?
53
65
  @http.keep_alive_timeout = KEEP_ALIVE_TIMEOUT
54
66
 
@@ -329,6 +341,9 @@ module OpenTelemetry
329
341
 
330
342
  def as_otlp_key_value(key, value)
331
343
  Opentelemetry::Proto::Common::V1::KeyValue.new(key: key, value: as_otlp_any_value(value))
344
+ rescue Encoding::UndefinedConversionError => e
345
+ OpenTelemetry.handle_error(exception: e, message: "encoding error for key #{key} and value #{value}")
346
+ Opentelemetry::Proto::Common::V1::KeyValue.new(key: key, value: as_otlp_any_value('Encoding Error'))
332
347
  end
333
348
 
334
349
  def as_otlp_any_value(value)
@@ -8,7 +8,7 @@ module OpenTelemetry
8
8
  module Exporter
9
9
  module OTLP
10
10
  ## Current OpenTelemetry OTLP exporter version
11
- VERSION = '0.18.0'
11
+ VERSION = '0.19.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.18.0
4
+ version: 0.19.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: 2021-05-21 00:00:00.000000000 Z
11
+ date: 2021-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -215,10 +215,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
215
215
  licenses:
216
216
  - Apache-2.0
217
217
  metadata:
218
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.18.0/file.CHANGELOG.html
218
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.19.0/file.CHANGELOG.html
219
219
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp
220
220
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
221
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.18.0
221
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.19.0
222
222
  post_install_message:
223
223
  rdoc_options: []
224
224
  require_paths: