opentelemetry-instrumentation-sidekiq 0.26.0 → 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 +4 -0
- 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 +4 -158
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
@@ -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.26.
|
4
|
+
version: 0.26.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: 2025-01
|
11
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -38,160 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.23.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.69.1
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 1.69.1
|
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.23.0
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 1.23.0
|
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'
|
195
41
|
description: Sidekiq instrumentation for the OpenTelemetry framework
|
196
42
|
email:
|
197
43
|
- cncf-opentelemetry-contributors@lists.cncf.io
|
@@ -217,10 +63,10 @@ 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.26.
|
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.26.
|
69
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-sidekiq/0.26.1
|
224
70
|
post_install_message:
|
225
71
|
rdoc_options: []
|
226
72
|
require_paths:
|