opentelemetry-instrumentation-resque 0.3.1 → 0.4.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: ef796cb15879b9402a9011bb7dcc141749218e5be48cb2a8f4738566cf2197aa
4
- data.tar.gz: 69bad550cf1f1aa2599b14fcc35006081a5d4a8d7f781eb2267a487941e2af0f
3
+ metadata.gz: 746b7a4e96c5fd50366102226381d61002b6a3ead260a20fd4e914753c6c47f4
4
+ data.tar.gz: e04f3c654a08fbcf38b8f9b0bf51dfd31ab2308ec6d6b743877a1850f9e9db18
5
5
  SHA512:
6
- metadata.gz: bcdf36e15622c47911fda2a55943986379c4be855f5223df6a02132eb8562535a1e3765c636c7eb2327d88684b8e749d141d896689d14b598a4c3c9a35a4329d
7
- data.tar.gz: c4984d73ad916d4b9361eda5be9ae860204189a2660ce4a98f13480a0bc25d40453dfc1bbf9fc431419836fc9f8b16bb7b6f27c221881f32e00d4ea0ea8c6c9e
6
+ metadata.gz: 972fcff396d70a3f204858ec12137d9235e87490d3a4b5768c47885e660b0ccf77ae47cd543c1584eb04f6e4ab42cdc67c085ba83f04b4ecf88e206ebc317112
7
+ data.tar.gz: 30609d820c45d2e1cde550f5be22e943df55a0b67cca5fa2765e8b43dd3d59bedd27a31118f481212795cf155d7fc539b3a56e6e15c84de8b91c6a874616d9b2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release History: opentelemetry-instrumentation-resque
2
2
 
3
+ ### v0.4.1 / 2023-06-05
4
+
5
+ * FIXED: Base config options
6
+
7
+ ### v0.4.0 / 2023-04-17
8
+
9
+ * BREAKING CHANGE: Drop support for EoL Ruby 2.7
10
+
11
+ * ADDED: Drop support for EoL Ruby 2.7
12
+ * ADDED: Add :force_flush option to Resque instrumentation
13
+ * FIXED: Fix flaky tests for resque.
14
+
3
15
  ### v0.3.1 / 2023-01-14
4
16
 
5
17
  * DOCS: Fix gem homepage
@@ -18,8 +18,33 @@ module OpenTelemetry
18
18
  defined?(::Resque)
19
19
  end
20
20
 
21
- option :span_naming, default: :queue, validate: %I[job_class queue]
22
- option :propagation_style, default: :link, validate: %i[link child none]
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
+ option :force_flush, default: :ask_the_job, validate: %I[ask_the_job always never]
46
+ option :span_naming, default: :queue, validate: %I[job_class queue]
47
+ option :propagation_style, default: :link, validate: %i[link child none]
23
48
 
24
49
  private
25
50
 
@@ -54,6 +54,11 @@ module OpenTelemetry
54
54
  end
55
55
  end
56
56
  end
57
+ ensure
58
+ if (config[:force_flush] == :ask_the_job && worker&.fork_per_job?) ||
59
+ config[:force_flush] == :always
60
+ OpenTelemetry.tracer_provider.force_flush
61
+ end
57
62
  end
58
63
 
59
64
  private
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Resque
10
- VERSION = '0.3.1'
10
+ VERSION = '0.4.1'
11
11
  end
12
12
  end
13
13
  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.3.1
4
+ version: 0.4.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-01-14 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.21.0
33
+ version: 0.22.1
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.21.0
40
+ version: 0.22.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: opentelemetry-test-helpers
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '0.3'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '0.3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.41.1
145
+ version: 1.50.2
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.41.1
152
+ version: 1.50.2
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -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.3.1/file/CHANGELOG.md
231
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-resque/0.4.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.3.1
234
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-resque/0.4.1
235
235
  post_install_message:
236
236
  rdoc_options: []
237
237
  require_paths:
@@ -240,14 +240,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - ">="
242
242
  - !ruby/object:Gem::Version
243
- version: 2.6.0
243
+ version: '3.0'
244
244
  required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
246
  - - ">="
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.1.6
250
+ rubygems_version: 3.2.33
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Resque instrumentation for the OpenTelemetry framework