opentelemetry-instrumentation-sidekiq 0.5.0 → 0.6.0

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: 1a4372caa4ce93660a0272de62ff47b1fd0f897b10e34b4c4713e86886dcb661
4
- data.tar.gz: 454e13a799f4bcc980cc2cfc2f7d07380bec8be88005a2c09e1a109e95269874
3
+ metadata.gz: 90f59b0c373512a72d8b43705d86cd176e8c9c3c98daaf268b6a6e9ae6f1c8f3
4
+ data.tar.gz: 23474ce25ad1da1527cbb6c528a12f31d674468fafd43e36edd1ce420d1a2098
5
5
  SHA512:
6
- metadata.gz: '08ca6e4746b64d3db1fe66a007427c2c79e95babfb38000365e4d1e76572979f7bab14775e1b53e59d49c41a577194454a98e08fe1aa4a33f359c6e99901a7d7'
7
- data.tar.gz: acd6f8ec2c30bc02adb91e85c6ce5ea211c74e8f7ea6405e2ca98d384e4438ddc8b0144a350676a17ef91678d0fa92b5d6239de8611c6207452df24d0eb8622d
6
+ metadata.gz: 67cb2fe1ea747b32529bde4f95c2be62b145bc1c9d8456e66321b28d2debe8cfa6245ebc5364fd9283f59e2a12cbfb992d1a067e10cf7de48855a948a3d97250
7
+ data.tar.gz: e4444ce255afde7f1d6cd7874126318d7adb3d8f1de76e694b3598d985921911ad9d2a90838cd336fefdac6369e7821714ab91156bd363d4c6ddcc554851f4a3
@@ -0,0 +1,5 @@
1
+ # Release History: opentelemetry-instrumentation-sidekiq
2
+
3
+ ### v0.6.0 / 2020-09-10
4
+
5
+ * (No significant changes)
@@ -45,7 +45,7 @@ module OpenTelemetry
45
45
  end
46
46
  end
47
47
 
48
- if defined?(::Sidekiq::Testing)
48
+ if defined?(::Sidekiq::Testing) # rubocop:disable Style/GuardClause
49
49
  ::Sidekiq::Testing.server_middleware do |chain|
50
50
  chain.add Middlewares::Server::TracerMiddleware
51
51
  end
@@ -9,18 +9,20 @@ module OpenTelemetry
9
9
  module Sidekiq
10
10
  module Middlewares
11
11
  module Client
12
+ # TracerMiddleware propagates context and instruments Sidekiq client
13
+ # by way of its middleware system
12
14
  class TracerMiddleware
13
15
  def call(_worker_class, job, _queue, _redis_pool)
14
16
  tracer.in_span(
15
17
  job['wrapped']&.to_s || job['class'],
16
18
  attributes: {
17
19
  'messaging.message_id' => job['jid'],
18
- 'messaging.destination' => job['queue'],
20
+ 'messaging.destination' => job['queue']
19
21
  },
20
22
  kind: :producer
21
23
  ) do |span|
22
24
  OpenTelemetry.propagation.text.inject(job)
23
- span.add_event(name: 'created_at', timestamp: job['created_at'])
25
+ span.add_event('created_at', timestamp: job['created_at'])
24
26
  yield
25
27
  end
26
28
  end
@@ -9,6 +9,8 @@ module OpenTelemetry
9
9
  module Sidekiq
10
10
  module Middlewares
11
11
  module Server
12
+ # TracerMiddleware propagates context and instruments Sidekiq requests
13
+ # by way of its middleware system
12
14
  class TracerMiddleware
13
15
  def call(_worker, msg, _queue)
14
16
  parent_context = OpenTelemetry.propagation.text.extract(msg)
@@ -16,13 +18,13 @@ module OpenTelemetry
16
18
  msg['wrapped']&.to_s || msg['class'],
17
19
  attributes: {
18
20
  'messaging.message_id' => msg['jid'],
19
- 'messaging.destination' => msg['queue'],
21
+ 'messaging.destination' => msg['queue']
20
22
  },
21
23
  with_parent_context: parent_context,
22
24
  kind: :consumer
23
25
  ) do |span|
24
- span.add_event(name: 'created_at', timestamp: msg['created_at'])
25
- span.add_event(name: 'enqueued_at', timestamp: msg['enqueued_at'])
26
+ span.add_event('created_at', timestamp: msg['created_at'])
27
+ span.add_event('enqueued_at', timestamp: msg['enqueued_at'])
26
28
  yield
27
29
  end
28
30
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Sidekiq
10
- VERSION = '0.5.0'
10
+ VERSION = '0.6.0'
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-sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.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: 2020-07-17 00:00:00.000000000 Z
11
+ date: 2020-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -157,6 +157,7 @@ executables: []
157
157
  extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
+ - CHANGELOG.md
160
161
  - LICENSE
161
162
  - lib/opentelemetry-instrumentation-sidekiq.rb
162
163
  - lib/opentelemetry/instrumentation.rb
@@ -184,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
185
  - !ruby/object:Gem::Version
185
186
  version: '0'
186
187
  requirements: []
187
- rubygems_version: 3.0.3
188
+ rubygems_version: 3.1.2
188
189
  signing_key:
189
190
  specification_version: 4
190
191
  summary: Sidekiq instrumentation for the OpenTelemetry framework