sidekiq_publisher 1.7.0.rc0 → 1.7.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sidekiq_publisher/datadog_apm.rb +10 -6
- data/lib/sidekiq_publisher/version.rb +1 -1
- 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: 7b46548489774867e03fcbd1c4359909cc12d4baf7a92091d06bf45bba3d3120
|
4
|
+
data.tar.gz: c8f0fcd1ec8127f62e880a6282baeeb8b851583d06db25d0ac2e3d85287e1e32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36d2cfa5d35ef29acde6294318d34fbbccf2960d2bd5304ec35bdf0b1c76d4abf6f4130daf0cd37046f101242e236c4855e2a777a7ca6cddb62ca8ae0fad07ea
|
7
|
+
data.tar.gz: 1ac0af71177ed8b6188f0c845e2bb832c73f911326cb8b078f64ce506ce80bc5d6078b0a5a6c9ae0c29839a996f3d92f43f417e2efd38320b615b57c73ac8dbf
|
@@ -5,6 +5,8 @@ require "ddtrace"
|
|
5
5
|
|
6
6
|
module SidekiqPublisher
|
7
7
|
module DatadogAPM
|
8
|
+
OPERATION = "sidekiq_publisher"
|
9
|
+
|
8
10
|
class << self
|
9
11
|
attr_writer :service
|
10
12
|
|
@@ -24,11 +26,13 @@ module SidekiqPublisher
|
|
24
26
|
|
25
27
|
private
|
26
28
|
|
27
|
-
def start_span(operation, payload)
|
28
|
-
|
29
|
-
|
29
|
+
def start_span(operation, payload, resource = nil)
|
30
|
+
resource ||= operation
|
31
|
+
payload[:datadog_span] = Datadog.tracer.trace(operation, service: service, resource: resource)
|
32
|
+
end
|
30
33
|
|
31
|
-
|
34
|
+
def start_primary_span(resource, payload)
|
35
|
+
start_span(OPERATION, payload, resource)
|
32
36
|
end
|
33
37
|
|
34
38
|
def finish_span(payload)
|
@@ -43,7 +47,7 @@ module SidekiqPublisher
|
|
43
47
|
|
44
48
|
class ListenerSubscriber < Subscriber
|
45
49
|
def start(_name, _id, payload)
|
46
|
-
|
50
|
+
start_primary_span("listener.timeout", payload)
|
47
51
|
end
|
48
52
|
|
49
53
|
subscribe_to "timeout.listener.sidekiq_publisher"
|
@@ -52,7 +56,7 @@ module SidekiqPublisher
|
|
52
56
|
class RunnerSubscriber < Subscriber
|
53
57
|
def start(name, _id, payload)
|
54
58
|
op_name = name.split(".").first
|
55
|
-
|
59
|
+
start_primary_span("publisher.#{op_name}", payload)
|
56
60
|
end
|
57
61
|
|
58
62
|
subscribe_to "start.publisher.sidekiq_publisher"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq_publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.0.
|
4
|
+
version: 1.7.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ezCater, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|