datadog-queue-bus 0.1.0 → 1.0.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: 4ad428a289fdd46db3f137b73ba218181fad158740a9f0575c477382a00a2969
4
- data.tar.gz: ad05ab82689904f01e58a8a4cc65034fb262985492bb0bb1538f7439956deea2
3
+ metadata.gz: ab6a99689804af63991df6a3f7a36bd9e6be13875dc42ed6cf2cd72af6218ca8
4
+ data.tar.gz: 501d5f4e00df7b211e78df6b3ee49f7972aeeceb12428e0109e63b07042cab5c
5
5
  SHA512:
6
- metadata.gz: b19fff38fb1be2d7b46fd94ae2843a6c46fe211dcfe1c8b46f201ece407f0d0029bff66d7797d4e2eb4fe2d36f981d82d6a83c2598371981e733fe6b98d20efd
7
- data.tar.gz: 451ad0b73f8c1de92ecd52f3c417826e830d2b4a36dd9691ebe1e3e5ecdcd52c609998c324b52dfa47a078a00aa5edc0deef80ca17c561afc6fce7e9426d49fd
6
+ metadata.gz: e753dca481dcde0632b5b00e58d6eededd515b26bd140ba8922e6eb9cfbb38c7a1925d12f9c20087e58a68a773c83c48783f7582eae6f40070acc2c3c20d9870
7
+ data.tar.gz: 955ff8f17cd9c2be7c6eeaa3dd364e66fe3992ac288d795eeb6da3b81935f83aee560867e9f14c2e8f7aef453409bcdcd3aca3d5479a2aa3038ae6cfc198dcd4
data/CHANGELOG.md CHANGED
@@ -4,7 +4,8 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [Unreleased]
7
+ ## [1.0.0]
8
+ - Updates ddtrace to the 1.X line and uses that version's `Datadog::Tracer` syntax
8
9
 
9
10
  ## [0.1.0]
10
11
 
@@ -30,10 +30,10 @@ Gem::Specification.new do |spec|
30
30
  spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
31
31
  spec.require_paths = ['lib']
32
32
 
33
- spec.add_dependency 'ddtrace', '~> 0.25'
33
+ spec.add_dependency 'ddtrace', '~> 1.0'
34
34
  spec.add_dependency 'queue-bus', '~> 0.6'
35
35
 
36
- spec.add_development_dependency 'bundler', '~> 1.17'
36
+ spec.add_development_dependency 'bundler', '~> 2.4'
37
37
  spec.add_development_dependency 'rake', '~> 10.0'
38
38
  spec.add_development_dependency 'rspec', '~> 3.0'
39
39
  spec.add_development_dependency 'rubocop', '~> 0.72'
@@ -13,9 +13,10 @@ module DatadogQueueBus
13
13
  resource += " event=#{event_type}" if event_type
14
14
  resource += " sub=#{sub_key}" if sub_key
15
15
 
16
- Datadog.tracer.trace('queue-bus.worker',
17
- service: DatadogQueueBus.service_name,
18
- resource: resource) do |span|
16
+ # def trace(name, continue_from: nil, **span_options, &block)
17
+ Datadog::Tracing.trace('queue-bus.worker',
18
+ service: DatadogQueueBus.service_name,
19
+ resource: resource) do |span|
19
20
  attrs.keys.grep(/^bus_/).each do |key|
20
21
  span.set_tag("queue-bus.#{key}", attrs[key])
21
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatadogQueueBus
4
- VERSION = '0.1.0'
4
+ VERSION = '1.0.0'
5
5
  end
@@ -11,9 +11,10 @@ RSpec.describe DatadogQueueBus::Middleware do
11
11
  'bus_class_proxy' => 'QueueBus::Driver'
12
12
  }
13
13
  end
14
+ let(:tracer) { Datadog::Tracing }
14
15
 
15
16
  it 'uses the class_proxy_class as the resource name' do
16
- expect(Datadog.tracer)
17
+ expect(tracer)
17
18
  .to receive(:trace)
18
19
  .with('queue-bus.worker', hash_including(resource: 'QueueBus::Driver'))
19
20
  subject.call(attrs)
@@ -27,7 +28,7 @@ RSpec.describe DatadogQueueBus::Middleware do
27
28
  end
28
29
 
29
30
  it 'sends the service name' do
30
- expect(Datadog.tracer)
31
+ expect(tracer)
31
32
  .to receive(:trace)
32
33
  .with('queue-bus.worker', hash_including(service: name))
33
34
  subject.call(attrs)
@@ -40,7 +41,7 @@ RSpec.describe DatadogQueueBus::Middleware do
40
41
  end
41
42
 
42
43
  it 'includes the event in the resource' do
43
- expect(Datadog.tracer)
44
+ expect(tracer)
44
45
  .to receive(:trace)
45
46
  .with('queue-bus.worker',
46
47
  hash_including(resource: a_string_matching(/event=my_event/)))
@@ -54,7 +55,7 @@ RSpec.describe DatadogQueueBus::Middleware do
54
55
  end
55
56
 
56
57
  it 'includes the sub key in the resource name' do
57
- expect(Datadog.tracer)
58
+ expect(tracer)
58
59
  .to receive(:trace)
59
60
  .with('queue-bus.worker',
60
61
  hash_including(resource: a_string_matching(/sub=my_subscription/)))
@@ -69,7 +70,7 @@ RSpec.describe DatadogQueueBus::Middleware do
69
70
 
70
71
  it 'includes all attributes that start with bus_' do
71
72
  span = spy('span')
72
- expect(Datadog.tracer).to receive(:trace).and_yield(span)
73
+ expect(tracer).to receive(:trace).and_yield(span)
73
74
  subject.call(attrs)
74
75
  expect(span).to have_received(:set_tag).with('queue-bus.bus_class_proxy', 'QueueBus::Driver')
75
76
  expect(span).to have_received(:set_tag).with('queue-bus.bus_field', 'my_field')
@@ -83,7 +84,7 @@ RSpec.describe DatadogQueueBus::Middleware do
83
84
 
84
85
  it 'includes all attributes that start with bus_' do
85
86
  span = spy('span')
86
- expect(Datadog.tracer).to receive(:trace).and_yield(span)
87
+ expect(tracer).to receive(:trace).and_yield(span)
87
88
  subject.call(attrs)
88
89
  expect(span).to have_received(:set_tag).with('queue-bus.bus_class_proxy', 'QueueBus::Driver')
89
90
  expect(span).not_to have_received(:set_tag).with('queue-bus.user_id', 1234)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datadog-queue-bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kbacha
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-10 00:00:00.000000000 Z
11
+ date: 2023-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ddtrace
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.25'
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.25'
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: queue-bus
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.17'
47
+ version: '2.4'
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: '1.17'
54
+ version: '2.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -127,7 +127,7 @@ homepage: https://github.com/queue-bus/datadog-queue-bus
127
127
  licenses:
128
128
  - MIT
129
129
  metadata: {}
130
- post_install_message:
130
+ post_install_message:
131
131
  rdoc_options: []
132
132
  require_paths:
133
133
  - lib
@@ -142,9 +142,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubyforge_project:
146
- rubygems_version: 2.7.6
147
- signing_key:
145
+ rubygems_version: 3.2.33
146
+ signing_key:
148
147
  specification_version: 4
149
148
  summary: A Datadog APM integration for queue-bus
150
149
  test_files: