opentelemetry-exporter-zipkin 0.21.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb192745d9de9b710c3bb323b3a7d9fd1d3dff3efeb35a6ec70a0a07c4465fc2
|
4
|
+
data.tar.gz: b69bcd05aaed8a6f778b0d9ad836feeee5b44bbe47cc139177b75176224bcb1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d52d8c89884b0e7683d578cbaf32526d3cde2aa1024a2dada78a7631278ef9cb9409fe1c1c1ee2853d2f0b7be0691896ecd2749baa8737b1881c0c6f3533897
|
7
|
+
data.tar.gz: d77bf93999d54282da404cf172e61095e98c48dbb6824fdeee1f59a8a1513e305078f2e05405a150734718b8a85828c05ad5f24d3298937f64e0d21d23544cf4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Release History: opentelemetry-exporter-zipkin
|
2
2
|
|
3
|
+
### v0.23.0 / 2023-06-08
|
4
|
+
|
5
|
+
* BREAKING CHANGE: Remove support for EoL Ruby 2.7
|
6
|
+
|
7
|
+
* ADDED: Remove support for EoL Ruby 2.7
|
8
|
+
|
9
|
+
### v0.22.0 / 2023-05-30
|
10
|
+
|
11
|
+
* ADDED: Custom Metrics Reporter Support for Zipkin
|
12
|
+
|
3
13
|
### v0.21.0 / 2022-09-14
|
4
14
|
|
5
15
|
* ADDED: Add dropped events/attributes/links counts to zipkin + jaeger exporters
|
@@ -29,7 +29,8 @@ module OpenTelemetry
|
|
29
29
|
|
30
30
|
def initialize(endpoint: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_ZIPKIN_ENDPOINT', default: 'http://localhost:9411/api/v2/spans'),
|
31
31
|
headers: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_ZIPKIN_TRACES_HEADERS', 'OTEL_EXPORTER_ZIPKIN_HEADERS'),
|
32
|
-
timeout: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_ZIPKIN_TRACES_TIMEOUT', 'OTEL_EXPORTER_ZIPKIN_TIMEOUT', default: 10)
|
32
|
+
timeout: OpenTelemetry::Common::Utilities.config_opt('OTEL_EXPORTER_ZIPKIN_TRACES_TIMEOUT', 'OTEL_EXPORTER_ZIPKIN_TIMEOUT', default: 10),
|
33
|
+
metrics_reporter: nil)
|
33
34
|
raise ArgumentError, "invalid url for Zipkin::Exporter #{endpoint}" unless OpenTelemetry::Common::Utilities.valid_url?(endpoint)
|
34
35
|
raise ArgumentError, 'headers must be comma-separated k=v pairs or a Hash' unless valid_headers?(headers)
|
35
36
|
|
@@ -50,6 +51,7 @@ module OpenTelemetry
|
|
50
51
|
when Hash then headers
|
51
52
|
end
|
52
53
|
|
54
|
+
@metrics_reporter = metrics_reporter || OpenTelemetry::SDK::Trace::Export::MetricsReporter
|
53
55
|
@shutdown = false
|
54
56
|
end
|
55
57
|
|
@@ -66,6 +68,7 @@ module OpenTelemetry
|
|
66
68
|
zipkin_spans = encode_spans(span_data)
|
67
69
|
send_spans(zipkin_spans, timeout: timeout)
|
68
70
|
rescue StandardError => e
|
71
|
+
@metrics_reporter.add_to_counter('otel.zipkin_exporter.failure', labels: { 'reason' => e.class.to_s })
|
69
72
|
OpenTelemetry.handle_error(exception: e, message: 'unexpected error in Zipkin::Exporter#export')
|
70
73
|
FAILURE
|
71
74
|
end
|
@@ -112,7 +115,7 @@ module OpenTelemetry
|
|
112
115
|
false
|
113
116
|
end
|
114
117
|
|
115
|
-
def send_spans(zipkin_spans, timeout: nil) # rubocop:disable Metrics/
|
118
|
+
def send_spans(zipkin_spans, timeout: nil) # rubocop:disable Metrics/MethodLength
|
116
119
|
retry_count = 0
|
117
120
|
timeout ||= @timeout
|
118
121
|
start_time = OpenTelemetry::Common::Utilities.timeout_timestamp
|
@@ -130,7 +133,7 @@ module OpenTelemetry
|
|
130
133
|
@http.write_timeout = remaining_timeout if WRITE_TIMEOUT_SUPPORTED
|
131
134
|
@http.start unless @http.started?
|
132
135
|
|
133
|
-
response = @http.request(request)
|
136
|
+
response = measure_request_duration { @http.request(request) }
|
134
137
|
response.body # Read and discard body
|
135
138
|
# in opentelemetry-js 200-399 is succcess, in opentelemetry-collector zipkin exporter,200-299 is a success
|
136
139
|
# zipkin api docs list 202 as default success code
|
@@ -171,7 +174,7 @@ module OpenTelemetry
|
|
171
174
|
# TODO: figure out destination and reinitialize @http and @path
|
172
175
|
end
|
173
176
|
|
174
|
-
def backoff?(
|
177
|
+
def backoff?(retry_count:, reason:, retry_after: nil)
|
175
178
|
return false if retry_count > RETRY_COUNT
|
176
179
|
|
177
180
|
# TODO: metric exporter
|
@@ -197,6 +200,19 @@ module OpenTelemetry
|
|
197
200
|
sleep(sleep_interval)
|
198
201
|
true
|
199
202
|
end
|
203
|
+
|
204
|
+
def measure_request_duration
|
205
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
206
|
+
begin
|
207
|
+
response = yield
|
208
|
+
ensure
|
209
|
+
stop = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
210
|
+
duration_ms = 1000.0 * (stop - start)
|
211
|
+
@metrics_reporter.record_value('otel.zipkin_exporter.request_duration',
|
212
|
+
value: duration_ms,
|
213
|
+
labels: { 'status' => response&.code || 'unknown' })
|
214
|
+
end
|
215
|
+
end
|
200
216
|
end
|
201
217
|
end
|
202
218
|
end
|
@@ -91,7 +91,7 @@ module OpenTelemetry
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
-
def add_conditional_tags(zipkin_span, span_data, tags, service_name)
|
94
|
+
def add_conditional_tags(zipkin_span, span_data, tags, service_name)
|
95
95
|
dropped_attributes_count = span_data.total_recorded_attributes - span_data.attributes&.size.to_i
|
96
96
|
dropped_events_count = span_data.total_recorded_events - span_data.events&.size.to_i
|
97
97
|
dropped_links_count = span_data.total_recorded_links - span_data.links&.size.to_i
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-exporter-zipkin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 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:
|
11
|
+
date: 2023-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: '0.20'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: '0.20'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: opentelemetry-sdk
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 1.51.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 1.51.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: simplecov
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,10 +226,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
226
226
|
licenses:
|
227
227
|
- Apache-2.0
|
228
228
|
metadata:
|
229
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-zipkin/v0.
|
229
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-zipkin/v0.23.0/file.CHANGELOG.html
|
230
230
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/exporter/zipkin
|
231
231
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
232
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-zipkin/v0.
|
232
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-exporter-zipkin/v0.23.0
|
233
233
|
post_install_message:
|
234
234
|
rdoc_options: []
|
235
235
|
require_paths:
|
@@ -238,14 +238,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
238
|
requirements:
|
239
239
|
- - ">="
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
241
|
+
version: '3.0'
|
242
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
243
|
requirements:
|
244
244
|
- - ">="
|
245
245
|
- !ruby/object:Gem::Version
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
|
-
rubygems_version: 3.
|
248
|
+
rubygems_version: 3.2.33
|
249
249
|
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: Zipkin trace exporter for the OpenTelemetry framework
|