opentelemetry-instrumentation-resque 0.4.2 → 0.5.1

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: e05b67a78fc27cb1871e17ba8bfd39d893b838e664e46ccdd0059152be81e3ff
4
- data.tar.gz: ba5674ebf49db2ed1e9357babfdcd88f2050cb6fb7f9aeacf28359f9db23403f
3
+ metadata.gz: bf90ba504c51858ede701a5517139e757090db7d7b5cad74e705af71c6d749b9
4
+ data.tar.gz: d1c6c0d56daa9c3d5f7460b9272a0a81a6cf87e7e2a48ac67f1f5b93a35e4b11
5
5
  SHA512:
6
- metadata.gz: 5f79ea6418b47cc264bc93ca22281f30d2d108ab75aa1bb37ab33675df8956142342159f35a5e71adc0db00c2f040e3efe2dcb9015d9fc3f6e3ea10822cf0f8f
7
- data.tar.gz: 31dbf0e6ac02133c8f61102a3625dcf6a9e010ff289e7d392fbac512d3e411e440b99136b55d642a1823df8fe7778d73f3d52f38217b9ae11381fc4ed03692f2
6
+ metadata.gz: e54453118a9035506cbe4024057bcd04cc3d96e6b73df9fb555efaa5cd3a39d8f72287d3ab26bcc60dd9cda092bcbccb72a309edbb220a4b9a64bab429e55320
7
+ data.tar.gz: 36ba410d67292c72f743f4cc87527d8339f4f046cd55aea42601cb5bd4836351424b67ee72e73a92290297f5918687c241903cf377566231c399f5876d10fdbd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History: opentelemetry-instrumentation-resque
2
2
 
3
+ ### v0.5.1 / 2024-02-08
4
+
5
+ * DOCS: Relocate Resque config option comments to render in Yard docs
6
+
7
+ ### v0.5.0 / 2023-09-07
8
+
9
+ * FIXED: Align messaging instrumentation operation names
10
+
3
11
  ### v0.4.2 / 2023-08-03
4
12
 
5
13
  * FIXED: Remove inline linter rules
@@ -7,7 +7,61 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Resque
10
- # The Instrumentation class contains logic to detect and install the Resque instrumentation
10
+ # The {OpenTelemetry::Instrumentation::Resque::Instrumentation} class contains logic to detect and install the Resque instrumentation
11
+ #
12
+ # Installation and configuration of this instrumentation is done within the
13
+ # {https://www.rubydoc.info/gems/opentelemetry-sdk/OpenTelemetry/SDK#configure-instance_method OpenTelemetry::SDK#configure}
14
+ # block, calling {https://www.rubydoc.info/gems/opentelemetry-sdk/OpenTelemetry%2FSDK%2FConfigurator:use use()}
15
+ # or {https://www.rubydoc.info/gems/opentelemetry-sdk/OpenTelemetry%2FSDK%2FConfigurator:use_all use_all()}.
16
+ #
17
+ # ## Configuration keys and options
18
+ #
19
+ # ### `:span_naming`
20
+ #
21
+ # Specifies how the span names are set. Can be one of:
22
+ #
23
+ # - `:queue` **(default)** - The job span name will appear as '<destination / queue name> <operation>',
24
+ # for example `default process`.
25
+ # - `:job_class` - The job span name will appear as '<job class name> <operation>',
26
+ # for example `SimpleJob process`.
27
+ #
28
+ # ### `:propagation_style`
29
+ #
30
+ # Specifies how the job's execution is traced and related to the trace where the job was enqueued.
31
+ #
32
+ # - `:link` **(default)** - The job will be represented by a separate trace from the span that enqueued the job.
33
+ # - The initial span of the job trace will be associated with the span that enqueued the job, via a
34
+ # {https://opentelemetry.io/docs/concepts/signals/traces/#span-links Span Link}.
35
+ # - `:child` - The job will be represented within the same logical trace, as a direct
36
+ # child of the span that enqueued the job.
37
+ # - `:none` - The job will be represented by a separate trace from the span that enqueued the job.
38
+ # There will be no explicit relationship between the job trace and the trace containing the span that
39
+ # enqueued the job.
40
+ #
41
+ # ### `:force_flush`
42
+ #
43
+ # Specifies whether spans are forcibly flushed (exported out of process) upon every job completion.
44
+ #
45
+ # - `:ask_the_job` **(default)** - Synchronously flush completed spans when a job completes if workers are
46
+ # forked for each job.
47
+ # - Determined by checking if {https://www.rubydoc.info/gems/resque/Resque%2FWorker:fork_per_job%3F Resque::Worker#fork_per_job?}
48
+ # is true. Spans must be flushed and exported before a worker process terminates or no telemetry will be sent.
49
+ # - `:always` - All completed spans will be synchronously flushed at the end of a job's execution.
50
+ # - `:never` - Job completion will not affect the export of spans out of worker processes.
51
+ # - Selecting this option will result in spans being lost if the worker process ends before
52
+ # the spans are flushed. You might select this option if you wish to coordinate the timing for flushing
53
+ # completed spans yourself.
54
+ #
55
+ # @example An explicit default configuration
56
+ # OpenTelemetry::SDK.configure do |c|
57
+ # c.use_all({
58
+ # 'OpenTelemetry::Instrumentation::Resque' => {
59
+ # span_naming: :queue,
60
+ # propagation_style: :link
61
+ # force_flush: :ask_the_job,
62
+ # },
63
+ # })
64
+ # end
11
65
  class Instrumentation < OpenTelemetry::Instrumentation::Base
12
66
  install do |_config|
13
67
  require_dependencies
@@ -18,30 +72,6 @@ module OpenTelemetry
18
72
  defined?(::Resque)
19
73
  end
20
74
 
21
- ## Supported configuration keys for the install config hash:
22
- #
23
- # force_flush: controls if spans are forcibly flushed upon job completion
24
- # - :ask_the_job (default) - if `Resque::Worker#fork_per_job?` is set,
25
- # all completed spans will be synchronously flushed at the end of a
26
- # job's execution
27
- # - :always - all completed spans will be synchronously flushed at the
28
- # end of a job's execution
29
- # - :never - the job will not intervene with the processing of spans
30
- #
31
- # span_naming: when `:job_class`, the span names will be set to
32
- # '<job class name> <operation>'. When `:queue`, the span names
33
- # will be set to '<destination / queue name> <operation>'
34
- #
35
- # propagation_style: controls how the job's execution is traced and related
36
- # to the trace where the job was enqueued. Can be one of:
37
- # - :link (default) - the job will be executed in a separate trace. The
38
- # initial span of the execution trace will be linked to the span that
39
- # enqueued the job, via a Span Link.
40
- # - :child - the job will be executed in the same logical trace, as a direct
41
- # child of the span that enqueued the job.
42
- # - :none - the job's execution will not be explicitly linked to the span that
43
- # enqueued the job.
44
-
45
75
  option :force_flush, default: :ask_the_job, validate: %I[ask_the_job always never]
46
76
  option :span_naming, default: :queue, validate: %I[job_class queue]
47
77
  option :propagation_style, default: :link, validate: %i[link child none]
@@ -35,8 +35,8 @@ module OpenTelemetry
35
35
  }
36
36
 
37
37
  span_name = case config[:span_naming]
38
- when :job_class then "#{job_class} send"
39
- else "#{queue} send"
38
+ when :job_class then "#{job_class} publish"
39
+ else "#{queue} publish"
40
40
  end
41
41
 
42
42
  tracer.in_span(span_name, attributes: attributes, kind: :producer) do
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Resque
10
- VERSION = '0.4.2'
10
+ VERSION = '0.5.1'
11
11
  end
12
12
  end
13
13
  end
@@ -9,7 +9,7 @@ require 'opentelemetry-instrumentation-base'
9
9
 
10
10
  module OpenTelemetry
11
11
  module Instrumentation
12
- # Contains the OpenTelemetry instrumentation for the Resque gem
12
+ # (see OpenTelemetry::Instrumentation::Resque::Instrumentation)
13
13
  module Resque
14
14
  end
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-resque
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.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: 2023-08-03 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.2.0
47
+ version: '2.5'
48
48
  type: :development
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: 2.2.0
54
+ version: '2.5'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -142,70 +142,70 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.55.1
145
+ version: 1.60.1
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.55.1
152
+ version: 1.60.1
153
153
  - !ruby/object:Gem::Dependency
154
- name: simplecov
154
+ name: rubocop-performance
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.17.1
159
+ version: '1.20'
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: 0.17.1
166
+ version: '1.20'
167
167
  - !ruby/object:Gem::Dependency
168
- name: webmock
168
+ name: simplecov
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 3.7.6
173
+ version: 0.17.1
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 3.7.6
180
+ version: 0.17.1
181
181
  - !ruby/object:Gem::Dependency
182
- name: yard
182
+ name: webmock
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0.9'
187
+ version: '3.19'
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: '0.9'
194
+ version: '3.19'
195
195
  - !ruby/object:Gem::Dependency
196
- name: yard-doctest
196
+ name: yard
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: 0.1.6
201
+ version: '0.9'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: 0.1.6
208
+ version: '0.9'
209
209
  description: Resque instrumentation for the OpenTelemetry framework
210
210
  email:
211
211
  - cncf-opentelemetry-contributors@lists.cncf.io
@@ -228,10 +228,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
228
228
  licenses:
229
229
  - Apache-2.0
230
230
  metadata:
231
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-resque/0.4.2/file/CHANGELOG.md
231
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-resque/0.5.1/file/CHANGELOG.md
232
232
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/resque
233
233
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
234
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-resque/0.4.2
234
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-resque/0.5.1
235
235
  post_install_message:
236
236
  rdoc_options: []
237
237
  require_paths: