opentelemetry-instrumentation-sidekiq 0.20.2 → 0.22.0
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 +5 -5
- 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 +51 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efbe08ed5c6ca69e9ec721821a8eed8bd66dcfb500383fd997fe44bcdecf31be
|
4
|
+
data.tar.gz: f45b1226607ce64df97d41578fb9ba3bb99a4d10da5650c696ba205a54975bd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f5754cba7ae2b00008b867da5bb8a799d8338feb958122f7ca282a72b5ebe5498f7939b499b3df11d29d5b9c56297578fe6de2a6edf75cbbb1f4c8b12a35f2c
|
7
|
+
data.tar.gz: 4ddaa4c139811319cc7ad9e4d429979b6f347c1b7c3c28cc19d99a41cf38e3619b2c3b16cb3ab1ba323a248148bac8750ad0c816c3165380a9e230edbbe03f7b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-sidekiq
|
2
2
|
|
3
|
+
### v0.22.0 / 2022-06-09
|
4
|
+
|
5
|
+
* Upgrading Base dependency version
|
6
|
+
|
7
|
+
### v0.21.1 / 2022-06-09
|
8
|
+
|
9
|
+
* FIXED: Broken test file requirements
|
10
|
+
* FIXED: Make sidekiq instrumentation compatible with sidekiq 6.5.0
|
11
|
+
|
12
|
+
### v0.21.0 / 2022-05-02
|
13
|
+
|
14
|
+
* ADDED: Validate Using Enums
|
15
|
+
* FIXED: RubyGems Fallback
|
16
|
+
|
3
17
|
### v0.20.2 / 2021-12-02
|
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
|
|
@@ -21,16 +21,16 @@ module OpenTelemetry
|
|
21
21
|
'messaging.destination_kind' => 'queue',
|
22
22
|
'messaging.operation' => 'process'
|
23
23
|
}
|
24
|
-
attributes['peer.service'] =
|
24
|
+
attributes['peer.service'] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service]
|
25
25
|
|
26
|
-
span_name = case
|
26
|
+
span_name = case instrumentation_config[:span_naming]
|
27
27
|
when :job_class then "#{msg['wrapped']&.to_s || msg['class']} process"
|
28
28
|
else "#{msg['queue']} process"
|
29
29
|
end
|
30
30
|
|
31
31
|
extracted_context = OpenTelemetry.propagation.extract(msg)
|
32
32
|
OpenTelemetry::Context.with_current(extracted_context) do
|
33
|
-
if
|
33
|
+
if instrumentation_config[:propagation_style] == :child
|
34
34
|
tracer.in_span(span_name, attributes: attributes, kind: :consumer) do |span|
|
35
35
|
span.add_event('created_at', timestamp: msg['created_at'])
|
36
36
|
span.add_event('enqueued_at', timestamp: msg['enqueued_at'])
|
@@ -39,7 +39,7 @@ module OpenTelemetry
|
|
39
39
|
else
|
40
40
|
links = []
|
41
41
|
span_context = OpenTelemetry::Trace.current_span(extracted_context).context
|
42
|
-
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?
|
43
43
|
span = tracer.start_root_span(span_name, attributes: attributes, links: links, kind: :consumer)
|
44
44
|
OpenTelemetry::Trace.with_span(span) do
|
45
45
|
span.add_event('created_at', timestamp: msg['created_at'])
|
@@ -58,7 +58,7 @@ module OpenTelemetry
|
|
58
58
|
|
59
59
|
private
|
60
60
|
|
61
|
-
def
|
61
|
+
def instrumentation_config
|
62
62
|
Sidekiq::Instrumentation.instance.config
|
63
63
|
end
|
64
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.22.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: 2022-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -44,14 +44,28 @@ dependencies:
|
|
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
|
@@ -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.22.0/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.22.0
|
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
|
- - ">="
|