action_subscriber-opentracing 1.0.2 → 1.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2d92504e37b0dffdfe1a89521981b16a8313c4b59f5a875cd19fae4632f5338
|
4
|
+
data.tar.gz: 81465bcf18f00c667df0cd4abdacac57c50f1844f20eda0a9f3a1259563f7e83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e980272c9d7a4089a25ff41456c070c8758f0a35fd1acf8e6399ca7a34dfe7e39a75e8a41c886f40a561081d6c59c1667a746a0076430d67c6863e5d498ba21f
|
7
|
+
data.tar.gz: 184845828fb3572cd056b1bd5a85b0fe4581255fb2fc6630b928b5a783f9ccaf539832ca7fb7c154163338254906e3a1e3cf4d8f994b4c69a468624d1ccbfc90
|
@@ -10,17 +10,20 @@ module ActionSubscriber
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def call(env)
|
13
|
-
operation = "#{env.subscriber}##{env.action}"
|
13
|
+
operation = "Subscriber #{env.subscriber}##{env.action}"
|
14
14
|
parent = ::OpenTracing.extract(::OpenTracing::FORMAT_TEXT_MAP, env.headers)
|
15
15
|
published_at = env.headers["published_at"]
|
16
16
|
|
17
17
|
options = {}
|
18
18
|
options[:references] = [::OpenTracing::Reference.follows_from(parent)] if parent
|
19
|
-
options[:tags] = {
|
20
|
-
|
21
|
-
|
19
|
+
options[:tags] = {
|
20
|
+
"span.kind" => "consumer",
|
21
|
+
"component" => "ActionSubscriber",
|
22
|
+
"message_bus.destination" => env.routing_key,
|
23
|
+
"message_bus.processed_at" => Time.now.strftime("%F %T.%3N %Z")
|
24
|
+
}
|
25
|
+
|
22
26
|
options[:tags]["message_bus.published_at"] = published_at if published_at
|
23
|
-
options[:tags]["message_bus.processed_at"] = Time.now.strftime("%F %T.%3N %Z")
|
24
27
|
|
25
28
|
result = nil
|
26
29
|
::OpenTracing.start_active_span(operation, options) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_subscriber-opentracing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Minond
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentracing
|