queue_classic_plus 4.0.0.alpha11 → 4.0.0.alpha12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/lib/queue_classic_plus/datadog.rb +9 -1
- data/lib/queue_classic_plus/version.rb +1 -1
- data/spec/datadog_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53bcc9820afd73035eac622633277005186232b40cee67736b6e7365dc00ccee
|
4
|
+
data.tar.gz: cfcb45c257cc50fdbeca8dd594aba7b0387ad6e210f7a1a314022488aae885cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bbd716d0c1a11645745f4929543bac35220db15e9bd76baf9677643cb5f66138ed7cc1a9c040d0bcfa91b57bb9afb84042339759e1a687c2bcdff805e14861e
|
7
|
+
data.tar.gz: ec310250c95292616e98e894ece699f6dc10adb7824684d0cfd209f56146c4b49f3d7ee32a37763a52947af7af8c05a7c0568a20327db22936ffe7f3328771ca
|
data/Gemfile
CHANGED
@@ -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/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.alpha12
|
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
|