opentelemetry-sdk 0.12.0 → 0.12.1
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: '079e4ea0a93345e6e014c3f7760425e042544ae619cf5761cb08813dac99a728'
|
4
|
+
data.tar.gz: f36464e88c42bd56a60060854da46daa42b35b720619201ed30e8a038ea567c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7305bdedc102299c04c3c0798d9137fc74919e4edd3eb37a4b239c739218274427b82f925d97cdcdebd192559033f025a6cad2f729f5d05c5856b6aa6e9e2170
|
7
|
+
data.tar.gz: efcd32dc9aa6c9e260b05829d790c294308e08bc7ca275647c33f54b03ac463a63da7962a9038917c6fe3571ae10dc61efaa09dfc17eb5bfae4ed040719a8c80
|
data/CHANGELOG.md
CHANGED
@@ -59,10 +59,10 @@ module OpenTelemetry
|
|
59
59
|
case ENV['OTEL_TRACE_SAMPLER']
|
60
60
|
when 'always_on' then Samplers::ALWAYS_ON
|
61
61
|
when 'always_off' then Samplers::ALWAYS_OFF
|
62
|
-
when 'traceidratio' then Samplers.trace_id_ratio_based(Float(ENV
|
62
|
+
when 'traceidratio' then Samplers.trace_id_ratio_based(Float(ENV.fetch('OTEL_TRACE_SAMPLER_ARG', 1.0)))
|
63
63
|
when 'parentbased_always_on' then Samplers.parent_based(root: Samplers::ALWAYS_ON)
|
64
64
|
when 'parentbased_always_off' then Samplers.parent_based(root: Samplers::ALWAYS_OFF)
|
65
|
-
when 'parentbased_traceidratio' then Samplers.parent_based(root: Samplers.trace_id_ratio_based(Float(ENV
|
65
|
+
when 'parentbased_traceidratio' then Samplers.parent_based(root: Samplers.trace_id_ratio_based(Float(ENV.fetch('OTEL_TRACE_SAMPLER_ARG', 1.0))))
|
66
66
|
else default_sampler
|
67
67
|
end
|
68
68
|
rescue StandardError => e
|
@@ -101,7 +101,7 @@ module OpenTelemetry
|
|
101
101
|
def force_flush(timeout: nil) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength
|
102
102
|
start_time = Time.now
|
103
103
|
snapshot = lock do
|
104
|
-
reset_on_fork
|
104
|
+
reset_on_fork if @keep_running
|
105
105
|
spans.shift(spans.size)
|
106
106
|
end
|
107
107
|
until snapshot.empty?
|
@@ -136,12 +136,13 @@ module OpenTelemetry
|
|
136
136
|
# non-specific failure occurred, TIMEOUT if a timeout occurred.
|
137
137
|
def shutdown(timeout: nil)
|
138
138
|
start_time = Time.now
|
139
|
-
lock do
|
139
|
+
thread = lock do
|
140
140
|
@keep_running = false
|
141
141
|
@condition.signal
|
142
|
+
@thread
|
142
143
|
end
|
143
144
|
|
144
|
-
|
145
|
+
thread&.join(timeout)
|
145
146
|
force_flush(timeout: OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time))
|
146
147
|
@exporter.shutdown(timeout: OpenTelemetry::Common::Utilities.maybe_timeout(timeout, start_time))
|
147
148
|
dropped_spans = lock { spans.size }
|
@@ -155,7 +156,6 @@ module OpenTelemetry
|
|
155
156
|
def work # rubocop:disable Metrics/AbcSize
|
156
157
|
loop do
|
157
158
|
batch = lock do
|
158
|
-
reset_on_fork(restart_thread: false)
|
159
159
|
@condition.wait(@mutex, @delay_seconds) if spans.size < batch_size && @keep_running
|
160
160
|
@condition.wait(@mutex, @delay_seconds) while spans.empty? && @keep_running
|
161
161
|
return unless @keep_running
|
@@ -175,7 +175,7 @@ module OpenTelemetry
|
|
175
175
|
|
176
176
|
@pid = pid
|
177
177
|
spans.clear
|
178
|
-
@thread = Thread.new { work }
|
178
|
+
@thread = restart_thread ? Thread.new { work } : nil
|
179
179
|
end
|
180
180
|
|
181
181
|
def export_batch(batch, timeout: @exporter_timeout_seconds)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.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: 2021-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -201,10 +201,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
201
201
|
licenses:
|
202
202
|
- Apache-2.0
|
203
203
|
metadata:
|
204
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-sdk/v0.12.
|
204
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-sdk/v0.12.1/file.CHANGELOG.html
|
205
205
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/master/sdk
|
206
206
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
207
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-sdk/v0.12.
|
207
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-sdk/v0.12.1
|
208
208
|
post_install_message:
|
209
209
|
rdoc_options: []
|
210
210
|
require_paths:
|