queue_classic_plus 4.0.0.alpha11 → 4.0.0.alpha13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/queue_classic_plus/datadog.rb +9 -1
- data/lib/queue_classic_plus/version.rb +1 -1
- data/queue_classic_plus.gemspec +1 -0
- data/spec/datadog_spec.rb +14 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fad0727ccc431b046daa9fa899876a8ff9da6737f332568b16f0caff2a9b611
|
4
|
+
data.tar.gz: e5049e96e9b9fa22a3cfa9af539110deefadcc2895567d762c17757a882c50c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '093dce00414281ddb7ea7ea910033a6859eb57fc0d3f1b1c953a5451690009d0209d730f2d6964da12307e8418ff7247f51e398fda6ffacc145450bf12825841'
|
7
|
+
data.tar.gz: 162549c1ded09273f540abd9f554b1f84164112557f2adee9945451262682f684749ca3fb88b3fb177c599a34e7cc040978085d082e3f6a65bf7325867ecaebd
|
@@ -1,9 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'dry-configurable'
|
4
|
+
|
3
5
|
module QueueClassicDatadog
|
6
|
+
extend Dry::Configurable
|
7
|
+
|
8
|
+
setting :dd_service
|
9
|
+
|
4
10
|
def _perform(*args)
|
11
|
+
service_name = QueueClassicDatadog.config.dd_service || 'qc.job'
|
12
|
+
|
5
13
|
if Gem.loaded_specs['ddtrace'].version >= Gem::Version.new('1')
|
6
|
-
Datadog::Tracing.trace('qc.job', service:
|
14
|
+
Datadog::Tracing.trace('qc.job', service: service_name, resource: "#{name}#perform") do |_|
|
7
15
|
super
|
8
16
|
end
|
9
17
|
else
|
data/queue_classic_plus.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "queue_classic", "4.0.0.pre.alpha1"
|
22
|
+
spec.add_dependency "dry-configurable", "1.1.0"
|
22
23
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0')
|
23
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
25
|
else
|
data/spec/datadog_spec.rb
CHANGED
@@ -15,4 +15,18 @@ describe 'requiring queue_classic_plus/new_relic' do
|
|
15
15
|
)
|
16
16
|
subject
|
17
17
|
end
|
18
|
+
|
19
|
+
context "when service name is configured" do
|
20
|
+
let(:configured_service_name) { "configured_service_name" }
|
21
|
+
|
22
|
+
it "traces using the service name" do
|
23
|
+
require 'queue_classic_plus/datadog'
|
24
|
+
QueueClassicDatadog.config.dd_service = configured_service_name
|
25
|
+
|
26
|
+
expect(Datadog::Tracing).to receive(:trace).with(
|
27
|
+
'qc.job', service: configured_service_name, resource: 'FunkyName#perform'
|
28
|
+
)
|
29
|
+
subject
|
30
|
+
end
|
31
|
+
end
|
18
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue_classic_plus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.alpha13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Mathieu
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-01
|
13
|
+
date: 2023-08-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: queue_classic
|
@@ -26,6 +26,20 @@ dependencies:
|
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: 4.0.0.pre.alpha1
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: dry-configurable
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 1.1.0
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 1.1.0
|
29
43
|
- !ruby/object:Gem::Dependency
|
30
44
|
name: bundler
|
31
45
|
requirement: !ruby/object:Gem::Requirement
|