opentelemetry-exporter-otlp 0.24.0 → 0.24.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/opentelemetry/exporter/otlp/exporter.rb +19 -7
- data/lib/opentelemetry/exporter/otlp/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19f69c6065c9bf4c537f1668c31e949540c02212f367148a3faebd95594153bf
|
4
|
+
data.tar.gz: 7c6a54a0d659617ff3894ca801b8101a0dfbeeb7a7b23580450c4d0ad6b62051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 786cf3844a9cf0c1526abe2a5c74cc3cb74db6c6896cbe03b4a5495b9216d31192f48d12b93d78c47ba9f61140b9b19e9521a208713be87bc7e0512141448d4a
|
7
|
+
data.tar.gz: 3cd71b5839ffb3ce84a458a466e4dbb57db63a1f57af286a7df2ab5a52965e7af6e685c8457160a123a9b25964cd59796e93337874b3f8b341510837aca4a229
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Release History: opentelemetry-exporter-otlp
|
2
2
|
|
3
|
+
### v0.24.1 / 2023-05-30
|
4
|
+
|
5
|
+
* FIXED: Add Ruby 3.2 to CI and do small fix
|
6
|
+
* FIXED: Adds User-Agent header in OTLP exporter
|
7
|
+
|
3
8
|
### v0.24.0 / 2022-09-14
|
4
9
|
|
5
10
|
* ADDED: Support InstrumentationScope, and update OTLP proto to 0.18.0
|
@@ -35,6 +35,8 @@ module OpenTelemetry
|
|
35
35
|
ERROR_MESSAGE_INVALID_HEADERS = 'headers must be a String with comma-separated URL Encoded UTF-8 k=v pairs or a Hash'
|
36
36
|
private_constant(:ERROR_MESSAGE_INVALID_HEADERS)
|
37
37
|
|
38
|
+
DEFAULT_USER_AGENT = "OTel-OTLP-Exporter-Ruby/#{OpenTelemetry::Exporter::OTLP::VERSION} Ruby/#{RUBY_VERSION} (#{RUBY_PLATFORM}; #{RUBY_ENGINE}/#{RUBY_ENGINE_VERSION})"
|
39
|
+
|
38
40
|
def self.ssl_verify_mode
|
39
41
|
if ENV.key?('OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_PEER')
|
40
42
|
OpenSSL::SSL::VERIFY_PEER
|
@@ -45,7 +47,7 @@ module OpenTelemetry
|
|
45
47
|
end
|
46
48
|
end
|
47
49
|
|
48
|
-
def initialize(endpoint: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_ENDPOINT', 'OTEL_EXPORTER_OTLP_ENDPOINT', default: 'http://localhost:4318/v1/traces'),
|
50
|
+
def initialize(endpoint: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_ENDPOINT', 'OTEL_EXPORTER_OTLP_ENDPOINT', default: 'http://localhost:4318/v1/traces'),
|
49
51
|
certificate_file: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE', 'OTEL_EXPORTER_OTLP_CERTIFICATE'),
|
50
52
|
ssl_verify_mode: Exporter.ssl_verify_mode,
|
51
53
|
headers: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_OTLP_TRACES_HEADERS', 'OTEL_EXPORTER_OTLP_HEADERS', default: {}),
|
@@ -64,12 +66,7 @@ module OpenTelemetry
|
|
64
66
|
@http = http_connection(@uri, ssl_verify_mode, certificate_file)
|
65
67
|
|
66
68
|
@path = @uri.path
|
67
|
-
@headers =
|
68
|
-
when String then parse_headers(headers)
|
69
|
-
when Hash then headers
|
70
|
-
else
|
71
|
-
raise ArgumentError, ERROR_MESSAGE_INVALID_HEADERS
|
72
|
-
end
|
69
|
+
@headers = prepare_headers(headers)
|
73
70
|
@timeout = timeout.to_f
|
74
71
|
@compression = compression
|
75
72
|
@metrics_reporter = metrics_reporter || OpenTelemetry::SDK::Trace::Export::MetricsReporter
|
@@ -389,6 +386,19 @@ module OpenTelemetry
|
|
389
386
|
result
|
390
387
|
end
|
391
388
|
|
389
|
+
def prepare_headers(config_headers)
|
390
|
+
headers = case config_headers
|
391
|
+
when String then parse_headers(config_headers)
|
392
|
+
when Hash then config_headers.dup
|
393
|
+
else
|
394
|
+
raise ArgumentError, ERROR_MESSAGE_INVALID_HEADERS
|
395
|
+
end
|
396
|
+
|
397
|
+
headers['User-Agent'] = "#{headers.fetch('User-Agent', '')} #{DEFAULT_USER_AGENT}".strip
|
398
|
+
|
399
|
+
headers
|
400
|
+
end
|
401
|
+
|
392
402
|
def parse_headers(raw)
|
393
403
|
entries = raw.split(',')
|
394
404
|
raise ArgumentError, ERROR_MESSAGE_INVALID_HEADERS if entries.empty?
|
@@ -398,6 +408,8 @@ module OpenTelemetry
|
|
398
408
|
begin
|
399
409
|
k = k.to_s.strip
|
400
410
|
v = v.to_s.strip
|
411
|
+
rescue Encoding::CompatibilityError
|
412
|
+
raise ArgumentError, ERROR_MESSAGE_INVALID_HEADERS
|
401
413
|
rescue ArgumentError => e
|
402
414
|
raise e, ERROR_MESSAGE_INVALID_HEADERS
|
403
415
|
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.24.
|
4
|
+
version: 0.24.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: googleapis-common-protos-types
|
@@ -279,10 +279,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
279
279
|
licenses:
|
280
280
|
- Apache-2.0
|
281
281
|
metadata:
|
282
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.24.
|
282
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.24.1/file.CHANGELOG.html
|
283
283
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/otlp
|
284
284
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
285
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.24.
|
285
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-otlp/v0.24.1
|
286
286
|
post_install_message:
|
287
287
|
rdoc_options: []
|
288
288
|
require_paths:
|