opentelemetry-instrumentation-active_job 0.7.6 → 0.7.8

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: 89f474f0e98fb6f3481f608845f526887cae95e7c4b809ba10730b16ab7fe7f7
4
- data.tar.gz: d5ae960715ee73afbc0d2fc6b899efdce4ce8bd4cb89f05392e09a37e2e58145
3
+ metadata.gz: 83878ea3440f5e705b8ef463c0499fe6c784f187f2d11eb7ef8c059375c21f42
4
+ data.tar.gz: 0abd4adc31c9b5dfb9debeecc4477821390a726db42b7b1489ef955e2c36ab86
5
5
  SHA512:
6
- metadata.gz: a8e5f53d8c11594d339f749fd9e67b1dc8b298f180c5c9a0d2c0c4bed8b9e15fc5fcb649b59c94080cb58b810ba4c3780caf28bfd61eaed0f57928fce9e81c7e
7
- data.tar.gz: 2e85cf90a1c65db191f45d614e03a0f3fe29065537f4401c0da1143860e32a0314174a90dfc1a40b1202b943a0a9c7b7131054eafdbb57db076cbf6beb944abb
6
+ metadata.gz: 768a51da026d1d55955e74c3e1b44cf35971262c40fba6bc4dc4a3e7890758335eeb5da2e2c8d3cc9eedf1995a6eb74de4ca9ed1ba7a78bf6b2fc5e9b3b455b1
7
+ data.tar.gz: e49523c5e33b7038a90924c8a2e1a9f4969fca0864fabeb8dd01527d2e78419c85eebe915a64a20a5c473ba625ef2c8a59501fd6d987c1c615441ff8163820ea
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History: opentelemetry-instrumentation-active_job
2
2
 
3
+ ### v0.7.8 / 2024-10-24
4
+
5
+ * FIXED: ActiveJob Propagate baggage information properly when performing
6
+
7
+ ### v0.7.7 / 2024-08-21
8
+
9
+ * FIXED: Propagate context between enqueue and perform
10
+
3
11
  ### v0.7.6 / 2024-08-15
4
12
 
5
13
  * FIXED: Prefix ::ActiveSupport when installing the instrumentation
@@ -23,8 +23,9 @@ module OpenTelemetry
23
23
  job = payload.fetch(:job)
24
24
  span_name = span_name(job, EVENT_NAME)
25
25
  span = tracer.start_span(span_name, kind: :producer, attributes: @mapper.call(payload))
26
+ token = OpenTelemetry::Context.attach(OpenTelemetry::Trace.context_with_span(span))
26
27
  OpenTelemetry.propagation.inject(job.__otel_headers) # This must be transmitted over the wire
27
- { span: span, ctx_token: OpenTelemetry::Context.attach(OpenTelemetry::Trace.context_with_span(span)) }
28
+ { span: span, ctx_token: token }
28
29
  end
29
30
  end
30
31
  end
@@ -27,14 +27,14 @@ module OpenTelemetry
27
27
  # TODO: Refactor into a propagation strategy
28
28
  propagation_style = @config[:propagation_style]
29
29
  if propagation_style == :child
30
- span = tracer.start_span(span_name, kind: :consumer, attributes: @mapper.call(payload))
30
+ span = tracer.start_span(span_name, with_parent: parent_context, kind: :consumer, attributes: @mapper.call(payload))
31
31
  else
32
32
  span_context = OpenTelemetry::Trace.current_span(parent_context).context
33
33
  links = [OpenTelemetry::Trace::Link.new(span_context)] if span_context.valid? && propagation_style == :link
34
34
  span = tracer.start_root_span(span_name, kind: :consumer, attributes: @mapper.call(payload), links: links)
35
35
  end
36
36
 
37
- { span: span, ctx_token: attach_consumer_context(span) }
37
+ { span: span, ctx_token: attach_consumer_context(span, parent_context) }
38
38
  end
39
39
 
40
40
  # This method attaches a span to multiple contexts:
@@ -42,9 +42,10 @@ module OpenTelemetry
42
42
  # This is used later to enrich the ingress span in children, e.g. setting span status to error when a child event like `discard` terminates due to an error
43
43
  # 2. Registers the ingress span as the "active" span, which is the default behavior of the SDK.
44
44
  # @param span [OpenTelemetry::Trace::Span] the currently active span used to record the exception and set the status
45
+ # @param parent_context [Context] The context to use as the parent for the consumer context
45
46
  # @return [Numeric] Context token that must be detached when finished
46
- def attach_consumer_context(span)
47
- consumer_context = OpenTelemetry::Trace.context_with_span(span)
47
+ def attach_consumer_context(span, parent_context)
48
+ consumer_context = OpenTelemetry::Trace.context_with_span(span, parent_context: parent_context)
48
49
  internal_context = OpenTelemetry::Instrumentation::ActiveJob.context_with_span(span, parent_context: consumer_context)
49
50
 
50
51
  OpenTelemetry::Context.attach(internal_context)
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module ActiveJob
10
- VERSION = '0.7.6'
10
+ VERSION = '0.7.8'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-active_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-15 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -142,28 +142,28 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.65.0
145
+ version: 1.67.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: 1.65.0
152
+ version: 1.67.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rubocop-performance
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '1.20'
159
+ version: 1.22.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '1.20'
166
+ version: 1.22.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: simplecov
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '3.19'
187
+ version: 3.24.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '3.19'
194
+ version: 3.24.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: yard
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -232,10 +232,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
232
232
  licenses:
233
233
  - Apache-2.0
234
234
  metadata:
235
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_job/0.7.6/file/CHANGELOG.md
235
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_job/0.7.8/file/CHANGELOG.md
236
236
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/active_job
237
237
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
238
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_job/0.7.6
238
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_job/0.7.8
239
239
  post_install_message:
240
240
  rdoc_options: []
241
241
  require_paths: