opentelemetry-instrumentation-sidekiq 0.20.1 → 0.21.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 +14 -0
- data/lib/opentelemetry/instrumentation/sidekiq/instrumentation.rb +3 -3
- data/lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb +3 -3
- data/lib/opentelemetry/instrumentation/sidekiq/middlewares/server/tracer_middleware.rb +7 -6
- data/lib/opentelemetry/instrumentation/sidekiq/patches/launcher.rb +3 -3
- data/lib/opentelemetry/instrumentation/sidekiq/patches/poller.rb +4 -4
- data/lib/opentelemetry/instrumentation/sidekiq/patches/processor.rb +3 -3
- data/lib/opentelemetry/instrumentation/sidekiq/version.rb +1 -1
- metadata +55 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cc83ff362f5090ca035b572e3676cf85e592a8c90a91cde8d9a61aa02d0f408
|
4
|
+
data.tar.gz: 6c7a097d13e35658a95554455e479b12ae8089ab32569739c6a68d1eed773a19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c8fa0bd57e19628d70e5b0e818e37aa6f1368900cbad30407506e02e0674ca20164a65e0e393e39f583a5085691b0716c25678253b9ebeba3673acb7762aa61
|
7
|
+
data.tar.gz: 88de2296bf1c878158456f56e0e22f8e68c186c31128ba35e9a867d9b2237e67ed6561f2ba8a3f166f2367477f48ebca5908000bb58c0659d2277b029ff2af21
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-sidekiq
|
2
2
|
|
3
|
+
### v0.21.1 / 2022-06-09
|
4
|
+
|
5
|
+
* FIXED: Broken test file requirements
|
6
|
+
* FIXED: Make sidekiq instrumentation compatible with sidekiq 6.5.0
|
7
|
+
|
8
|
+
### v0.21.0 / 2022-05-02
|
9
|
+
|
10
|
+
* ADDED: Validate Using Enums
|
11
|
+
* FIXED: RubyGems Fallback
|
12
|
+
|
13
|
+
### v0.20.2 / 2021-12-02
|
14
|
+
|
15
|
+
* (No significant changes)
|
16
|
+
|
3
17
|
### v0.20.1 / 2021-09-29
|
4
18
|
|
5
19
|
* (No significant changes)
|
@@ -27,8 +27,8 @@ module OpenTelemetry
|
|
27
27
|
gem_version >= MINIMUM_VERSION
|
28
28
|
end
|
29
29
|
|
30
|
-
option :span_naming, default: :queue, validate:
|
31
|
-
option :propagation_style, default: :link, validate:
|
30
|
+
option :span_naming, default: :queue, validate: %I[job_class queue]
|
31
|
+
option :propagation_style, default: :link, validate: %i[link child none]
|
32
32
|
option :trace_launcher_heartbeat, default: false, validate: :boolean
|
33
33
|
option :trace_poller_enqueue, default: false, validate: :boolean
|
34
34
|
option :trace_poller_wait, default: false, validate: :boolean
|
@@ -38,7 +38,7 @@ module OpenTelemetry
|
|
38
38
|
private
|
39
39
|
|
40
40
|
def gem_version
|
41
|
-
Gem.
|
41
|
+
Gem::Version.new(::Sidekiq::VERSION)
|
42
42
|
end
|
43
43
|
|
44
44
|
def require_dependencies
|
@@ -20,9 +20,9 @@ module OpenTelemetry
|
|
20
20
|
'messaging.destination' => job['queue'],
|
21
21
|
'messaging.destination_kind' => 'queue'
|
22
22
|
}
|
23
|
-
attributes['peer.service'] =
|
23
|
+
attributes['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
|
24
24
|
|
25
|
-
span_name = case
|
25
|
+
span_name = case instrumentation_config[:span_naming]
|
26
26
|
when :job_class then "#{job['wrapped']&.to_s || job['class']} send"
|
27
27
|
else "#{job['queue']} send"
|
28
28
|
end
|
@@ -36,7 +36,7 @@ module OpenTelemetry
|
|
36
36
|
|
37
37
|
private
|
38
38
|
|
39
|
-
def
|
39
|
+
def instrumentation_config
|
40
40
|
Sidekiq::Instrumentation.instance.config
|
41
41
|
end
|
42
42
|
|
@@ -18,18 +18,19 @@ module OpenTelemetry
|
|
18
18
|
'messaging.sidekiq.job_class' => msg['wrapped']&.to_s || msg['class'],
|
19
19
|
'messaging.message_id' => msg['jid'],
|
20
20
|
'messaging.destination' => msg['queue'],
|
21
|
-
'messaging.destination_kind' => 'queue'
|
21
|
+
'messaging.destination_kind' => 'queue',
|
22
|
+
'messaging.operation' => 'process'
|
22
23
|
}
|
23
|
-
attributes['peer.service'] =
|
24
|
+
attributes['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
|
24
25
|
|
25
|
-
span_name = case
|
26
|
+
span_name = case instrumentation_config[:span_naming]
|
26
27
|
when :job_class then "#{msg['wrapped']&.to_s || msg['class']} process"
|
27
28
|
else "#{msg['queue']} process"
|
28
29
|
end
|
29
30
|
|
30
31
|
extracted_context = OpenTelemetry.propagation.extract(msg)
|
31
32
|
OpenTelemetry::Context.with_current(extracted_context) do
|
32
|
-
if
|
33
|
+
if instrumentation_config[:propagation_style] == :child
|
33
34
|
tracer.in_span(span_name, attributes: attributes, kind: :consumer) do |span|
|
34
35
|
span.add_event('created_at', timestamp: msg['created_at'])
|
35
36
|
span.add_event('enqueued_at', timestamp: msg['enqueued_at'])
|
@@ -38,7 +39,7 @@ module OpenTelemetry
|
|
38
39
|
else
|
39
40
|
links = []
|
40
41
|
span_context = OpenTelemetry::Trace.current_span(extracted_context).context
|
41
|
-
links << OpenTelemetry::Trace::Link.new(span_context) if
|
42
|
+
links << OpenTelemetry::Trace::Link.new(span_context) if instrumentation_config[:propagation_style] == :link && span_context.valid?
|
42
43
|
span = tracer.start_root_span(span_name, attributes: attributes, links: links, kind: :consumer)
|
43
44
|
OpenTelemetry::Trace.with_span(span) do
|
44
45
|
span.add_event('created_at', timestamp: msg['created_at'])
|
@@ -57,7 +58,7 @@ module OpenTelemetry
|
|
57
58
|
|
58
59
|
private
|
59
60
|
|
60
|
-
def
|
61
|
+
def instrumentation_config
|
61
62
|
Sidekiq::Instrumentation.instance.config
|
62
63
|
end
|
63
64
|
|
@@ -13,9 +13,9 @@ module OpenTelemetry
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def ❤ # rubocop:disable Naming/MethodName
|
16
|
-
if
|
16
|
+
if instrumentation_config[:trace_launcher_heartbeat]
|
17
17
|
attributes = {}
|
18
|
-
attributes['peer.service'] =
|
18
|
+
attributes['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
|
19
19
|
tracer.in_span('Sidekiq::Launcher#heartbeat', attributes: attributes) { super }
|
20
20
|
else
|
21
21
|
OpenTelemetry::Common::Utilities.untraced { super }
|
@@ -26,7 +26,7 @@ module OpenTelemetry
|
|
26
26
|
Sidekiq::Instrumentation.instance.tracer
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def instrumentation_config
|
30
30
|
Sidekiq::Instrumentation.instance.config
|
31
31
|
end
|
32
32
|
end
|
@@ -11,9 +11,9 @@ module OpenTelemetry
|
|
11
11
|
# The Poller module contains instrumentation for the enqueue and wait methods
|
12
12
|
module Poller
|
13
13
|
def enqueue
|
14
|
-
if
|
14
|
+
if instrumentation_config[:trace_poller_enqueue]
|
15
15
|
attributes = {}
|
16
|
-
attributes['peer.service'] =
|
16
|
+
attributes['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
|
17
17
|
tracer.in_span('Sidekiq::Scheduled::Poller#enqueue', attributes: attributes) { super }
|
18
18
|
else
|
19
19
|
OpenTelemetry::Common::Utilities.untraced { super }
|
@@ -23,7 +23,7 @@ module OpenTelemetry
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def wait
|
26
|
-
if
|
26
|
+
if instrumentation_config[:trace_poller_wait]
|
27
27
|
tracer.in_span('Sidekiq::Scheduled::Poller#wait') { super }
|
28
28
|
else
|
29
29
|
OpenTelemetry::Common::Utilities.untraced { super }
|
@@ -34,7 +34,7 @@ module OpenTelemetry
|
|
34
34
|
Sidekiq::Instrumentation.instance.tracer
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
37
|
+
def instrumentation_config
|
38
38
|
Sidekiq::Instrumentation.instance.config
|
39
39
|
end
|
40
40
|
end
|
@@ -13,9 +13,9 @@ module OpenTelemetry
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def process_one
|
16
|
-
if
|
16
|
+
if instrumentation_config[:trace_processor_process_one]
|
17
17
|
attributes = {}
|
18
|
-
attributes['peer.service'] =
|
18
|
+
attributes['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
|
19
19
|
tracer.in_span('Sidekiq::Processor#process_one', attributes: attributes) { super }
|
20
20
|
else
|
21
21
|
OpenTelemetry::Common::Utilities.untraced { super }
|
@@ -26,7 +26,7 @@ module OpenTelemetry
|
|
26
26
|
Sidekiq::Instrumentation.instance.tracer
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def instrumentation_config
|
30
30
|
Sidekiq::Instrumentation.instance.config
|
31
31
|
end
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.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: 2022-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -30,28 +30,42 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.19.
|
33
|
+
version: 0.19.3
|
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.19.
|
40
|
+
version: 0.19.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: opentelemetry-instrumentation-base
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.21.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.21.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activejob
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.2'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.2'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: appraisal
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +114,42 @@ dependencies:
|
|
100
114
|
requirements:
|
101
115
|
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
117
|
+
version: '1.1'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
124
|
+
version: '1.1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: opentelemetry-test-helpers
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec-mocks
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
111
153
|
- !ruby/object:Gem::Dependency
|
112
154
|
name: rubocop
|
113
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +170,14 @@ dependencies:
|
|
128
170
|
requirements:
|
129
171
|
- - "~>"
|
130
172
|
- !ruby/object:Gem::Version
|
131
|
-
version: 5.
|
173
|
+
version: 5.2.0
|
132
174
|
type: :development
|
133
175
|
prerelease: false
|
134
176
|
version_requirements: !ruby/object:Gem::Requirement
|
135
177
|
requirements:
|
136
178
|
- - "~>"
|
137
179
|
- !ruby/object:Gem::Version
|
138
|
-
version: 5.
|
180
|
+
version: 5.2.0
|
139
181
|
- !ruby/object:Gem::Dependency
|
140
182
|
name: simplecov
|
141
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,10 +245,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
|
|
203
245
|
licenses:
|
204
246
|
- Apache-2.0
|
205
247
|
metadata:
|
206
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sidekiq/v0.
|
248
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sidekiq/v0.21.1/file.CHANGELOG.html
|
207
249
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/sidekiq
|
208
250
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
209
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sidekiq/v0.
|
251
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-sidekiq/v0.21.1
|
210
252
|
post_install_message:
|
211
253
|
rdoc_options: []
|
212
254
|
require_paths:
|
@@ -215,7 +257,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
257
|
requirements:
|
216
258
|
- - ">="
|
217
259
|
- !ruby/object:Gem::Version
|
218
|
-
version: 2.
|
260
|
+
version: 2.6.0
|
219
261
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
262
|
requirements:
|
221
263
|
- - ">="
|