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: 718ea2029bb234ea6ed56da8b65923595e275bb4730c3f3ea50bc20c4a01597d
4
- data.tar.gz: 39e4031d0ef4ff426fe9bd776b4e85a2dd351a77c9dc8e19b80330dc5bf9d544
3
+ metadata.gz: '079e4ea0a93345e6e014c3f7760425e042544ae619cf5761cb08813dac99a728'
4
+ data.tar.gz: f36464e88c42bd56a60060854da46daa42b35b720619201ed30e8a038ea567c7
5
5
  SHA512:
6
- metadata.gz: caa3842133c57ab739e0c21d8e1cd5f9cd58293e1e34055eef6b18fd4ff0869a39edbe87bcbb0fef7e76ea733f9ea0f9ff84663cf70a3a88820b7074c78c156d
7
- data.tar.gz: f3e8176d0b495ea3784b6f8e2b2676000e35b3db7a1fab7b0890014ff69accd9caa69a00af02b4668964d3837aabd470bdaec78bda0d06ada1a9cfe6f1b000a7
6
+ metadata.gz: 7305bdedc102299c04c3c0798d9137fc74919e4edd3eb37a4b239c739218274427b82f925d97cdcdebd192559033f025a6cad2f729f5d05c5856b6aa6e9e2170
7
+ data.tar.gz: efcd32dc9aa6c9e260b05829d790c294308e08bc7ca275647c33f54b03ac463a63da7962a9038917c6fe3571ae10dc61efaa09dfc17eb5bfae4ed040719a8c80
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-sdk
2
2
 
3
+ ### v0.12.1 / 2021-01-13
4
+
5
+ * FIXED: Fix several BatchSpanProcessor errors related to fork safety
6
+ * FIXED: Define default value for traceid ratio
7
+
3
8
  ### v0.12.0 / 2020-12-24
4
9
 
5
10
  * ADDED: Structured error handling
@@ -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['OTEL_TRACE_SAMPLER_ARG']))
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['OTEL_TRACE_SAMPLER_ARG'])))
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(restart_thread: false) if @keep_running
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
- @thread.join(timeout)
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 } if restart_thread
178
+ @thread = restart_thread ? Thread.new { work } : nil
179
179
  end
180
180
 
181
181
  def export_batch(batch, timeout: @exporter_timeout_seconds)
@@ -7,6 +7,6 @@
7
7
  module OpenTelemetry
8
8
  module SDK
9
9
  ## Current OpenTelemetry version
10
- VERSION = '0.12.0'
10
+ VERSION = '0.12.1'
11
11
  end
12
12
  end
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.0
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: 2020-12-24 00:00:00.000000000 Z
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.0/file.CHANGELOG.html
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.0
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: