opentelemetry-instrumentation-sidekiq 0.25.7 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +5 -3
- data/lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb +10 -1
- data/lib/opentelemetry/instrumentation/sidekiq/middlewares/server/tracer_middleware.rb +15 -4
- data/lib/opentelemetry/instrumentation/sidekiq/version.rb +1 -1
- metadata +11 -165
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa86d9aa62bcad0dd45d42e1ead163ca311460ac32653500c4fa89b60384f1ba
|
4
|
+
data.tar.gz: 9c24573f9c4da318bc34c4b23dee81ab2ca1b6e80d55f26c203d97e11fd2fbae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd307470e59ba8da823cf29f5edf1c75b77a9c846e6500ace538394bf99556839b1e29aff2129dd00704d0e487dda4d8927f153172bf02b5a042e7d994b5d40d
|
7
|
+
data.tar.gz: e5dbb767dfad49f5c126c9f35cf4962b243e45e5a891cf01442016c5e040784a03c89a4557191fea2f9636cf4b4678d7b5b99d1f9b23e4dbc7e7f71c465c2e10
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Release History: opentelemetry-instrumentation-sidekiq
|
2
2
|
|
3
|
+
### v0.26.1 / 2025-04-01
|
4
|
+
|
5
|
+
* FIXED: Add support for Sidekiq 8
|
6
|
+
|
7
|
+
### v0.26.0 / 2025-01-16
|
8
|
+
|
9
|
+
* BREAKING CHANGE: Set minimum supported version to Ruby 3.1
|
10
|
+
|
11
|
+
* ADDED: Set minimum supported version to Ruby 3.1
|
12
|
+
|
3
13
|
### v0.25.7 / 2024-07-23
|
4
14
|
|
5
15
|
* DOCS: Add cspell to CI
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ The Sidekiq instrumentation is a community-maintained instrumentation for the [S
|
|
6
6
|
|
7
7
|
Install the gem using:
|
8
8
|
|
9
|
-
```
|
9
|
+
```console
|
10
10
|
gem install opentelemetry-instrumentation-sidekiq
|
11
11
|
```
|
12
12
|
|
@@ -29,6 +29,7 @@ OpenTelemetry::SDK.configure do |c|
|
|
29
29
|
c.use_all
|
30
30
|
end
|
31
31
|
```
|
32
|
+
|
32
33
|
## Examples
|
33
34
|
|
34
35
|
Example usage can be seen in the `./example/sidekiq.rb` file [here](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/instrumentation/sidekiq/example/sidekiq.rb)
|
@@ -38,7 +39,7 @@ Example usage can be seen in the `./example/sidekiq.rb` file [here](https://gith
|
|
38
39
|
You'll need Redis installed locally to run the test suite. Once you've
|
39
40
|
installed it, it will start and stop automatically when you run `rake`.
|
40
41
|
|
41
|
-
```
|
42
|
+
```console
|
42
43
|
redis-server test/redis.conf
|
43
44
|
```
|
44
45
|
|
@@ -46,7 +47,7 @@ redis-server test/redis.conf
|
|
46
47
|
|
47
48
|
The `opentelemetry-instrumentation-sidekiq` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
|
48
49
|
|
49
|
-
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry
|
50
|
+
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby special interest group (SIG). You can get involved by joining us on our [GitHub Discussions][discussions-url], [Slack Channel][slack-channel] or attending our weekly meeting. See the [meeting calendar][community-meetings] for dates and times. For more information on this and other language SIGs, see the OpenTelemetry [community page][ruby-sig].
|
50
51
|
|
51
52
|
## License
|
52
53
|
|
@@ -58,4 +59,5 @@ The `opentelemetry-instrumentation-sidekiq` gem is distributed under the Apache
|
|
58
59
|
[license-github]: https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/LICENSE
|
59
60
|
[ruby-sig]: https://github.com/open-telemetry/community#ruby-sig
|
60
61
|
[community-meetings]: https://github.com/open-telemetry/community#community-meetings
|
62
|
+
[slack-channel]: https://cloud-native.slack.com/archives/C01NWKKMKMY
|
61
63
|
[discussions-url]: https://github.com/open-telemetry/opentelemetry-ruby/discussions
|
@@ -31,7 +31,7 @@ module OpenTelemetry
|
|
31
31
|
|
32
32
|
tracer.in_span(span_name, attributes: attributes, kind: :producer) do |span|
|
33
33
|
OpenTelemetry.propagation.inject(job)
|
34
|
-
span.add_event('created_at', timestamp: job['created_at'])
|
34
|
+
span.add_event('created_at', timestamp: time_from_timestamp(job['created_at']))
|
35
35
|
yield
|
36
36
|
end
|
37
37
|
end
|
@@ -45,6 +45,15 @@ module OpenTelemetry
|
|
45
45
|
def tracer
|
46
46
|
Sidekiq::Instrumentation.instance.tracer
|
47
47
|
end
|
48
|
+
|
49
|
+
def time_from_timestamp(timestamp)
|
50
|
+
if timestamp.is_a?(Float)
|
51
|
+
# old format, timestamps were stored as fractional seconds since the epoch
|
52
|
+
timestamp
|
53
|
+
else
|
54
|
+
timestamp/1000r
|
55
|
+
end
|
56
|
+
end
|
48
57
|
end
|
49
58
|
end
|
50
59
|
end
|
@@ -31,11 +31,13 @@ module OpenTelemetry
|
|
31
31
|
end
|
32
32
|
|
33
33
|
extracted_context = OpenTelemetry.propagation.extract(msg)
|
34
|
+
created_at = time_from_timestamp(msg['created_at'])
|
35
|
+
enqueued_at = time_from_timestamp(msg['created_at'])
|
34
36
|
OpenTelemetry::Context.with_current(extracted_context) do
|
35
37
|
if instrumentation_config[:propagation_style] == :child
|
36
38
|
tracer.in_span(span_name, attributes: attributes, kind: :consumer) do |span|
|
37
|
-
span.add_event('created_at', timestamp:
|
38
|
-
span.add_event('enqueued_at', timestamp:
|
39
|
+
span.add_event('created_at', timestamp: created_at)
|
40
|
+
span.add_event('enqueued_at', timestamp: enqueued_at)
|
39
41
|
yield
|
40
42
|
end
|
41
43
|
else
|
@@ -44,8 +46,8 @@ module OpenTelemetry
|
|
44
46
|
links << OpenTelemetry::Trace::Link.new(span_context) if instrumentation_config[:propagation_style] == :link && span_context.valid?
|
45
47
|
span = tracer.start_root_span(span_name, attributes: attributes, links: links, kind: :consumer)
|
46
48
|
OpenTelemetry::Trace.with_span(span) do
|
47
|
-
span.add_event('created_at', timestamp:
|
48
|
-
span.add_event('enqueued_at', timestamp:
|
49
|
+
span.add_event('created_at', timestamp: created_at)
|
50
|
+
span.add_event('enqueued_at', timestamp: enqueued_at)
|
49
51
|
yield
|
50
52
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
51
53
|
span.record_exception(e)
|
@@ -67,6 +69,15 @@ module OpenTelemetry
|
|
67
69
|
def tracer
|
68
70
|
Sidekiq::Instrumentation.instance.tracer
|
69
71
|
end
|
72
|
+
|
73
|
+
def time_from_timestamp(timestamp)
|
74
|
+
if timestamp.is_a?(Float)
|
75
|
+
# old format, timestamps were stored as fractional seconds since the epoch
|
76
|
+
timestamp
|
77
|
+
else
|
78
|
+
timestamp/1000r
|
79
|
+
end
|
80
|
+
end
|
70
81
|
end
|
71
82
|
end
|
72
83
|
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.26.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTelemetry Authors
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -30,168 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.23.0
|
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.
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: activejob
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '6.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '6.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: appraisal
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.5'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.5'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: bundler
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '2.4'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '2.4'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: minitest
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '5.0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '5.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: opentelemetry-sdk
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.1'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.1'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: opentelemetry-test-helpers
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0.3'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0.3'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rspec-mocks
|
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: rubocop
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 1.65.0
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 1.65.0
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: rubocop-performance
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '1.20'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '1.20'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: simplecov
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - "~>"
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 0.17.1
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - "~>"
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: 0.17.1
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: yard
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - "~>"
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0.9'
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - "~>"
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0.9'
|
40
|
+
version: 0.23.0
|
195
41
|
description: Sidekiq instrumentation for the OpenTelemetry framework
|
196
42
|
email:
|
197
43
|
- cncf-opentelemetry-contributors@lists.cncf.io
|
@@ -217,11 +63,11 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
217
63
|
licenses:
|
218
64
|
- Apache-2.0
|
219
65
|
metadata:
|
220
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sidekiq/0.
|
66
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sidekiq/0.26.1/file/CHANGELOG.md
|
221
67
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/sidekiq
|
222
68
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
223
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sidekiq/0.
|
224
|
-
post_install_message:
|
69
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sidekiq/0.26.1
|
70
|
+
post_install_message:
|
225
71
|
rdoc_options: []
|
226
72
|
require_paths:
|
227
73
|
- lib
|
@@ -229,15 +75,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
75
|
requirements:
|
230
76
|
- - ">="
|
231
77
|
- !ruby/object:Gem::Version
|
232
|
-
version: '3.
|
78
|
+
version: '3.1'
|
233
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
80
|
requirements:
|
235
81
|
- - ">="
|
236
82
|
- !ruby/object:Gem::Version
|
237
83
|
version: '0'
|
238
84
|
requirements: []
|
239
|
-
rubygems_version: 3.
|
240
|
-
signing_key:
|
85
|
+
rubygems_version: 3.3.27
|
86
|
+
signing_key:
|
241
87
|
specification_version: 4
|
242
88
|
summary: Sidekiq instrumentation for the OpenTelemetry framework
|
243
89
|
test_files: []
|