action_subscriber-opentracing 1.0.2 → 1.0.4
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: 7c90c964aed1b7ae0641845845d1e61ec9086d2d1c6f5be92fb55d6b57846887
|
4
|
+
data.tar.gz: 0dda267c487c7eff3d63f98d85c8d19ca64407e885406c553288af2c9bde42d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef38c3d26b2302b0ca3f158bf6b3781978ec25b1a7619887f4d7ee2ae82863a69b2046f89b3bcdb673e8ee569ff7264700371e83b1acb8fd16c4fdb73a707af1
|
7
|
+
data.tar.gz: 3e796182d0469dace2854d86fa61ec8f7ccb81ef3ec1470f01b1684a2dd499cebb2fc4610e95640f1211a1096f0fd39503969204bef3b11921c55cdd8363a934
|
@@ -10,20 +10,23 @@ 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
|
-
::OpenTracing.start_active_span(operation, options) do
|
29
|
+
::OpenTracing.start_active_span(operation, **options) do
|
27
30
|
result = @app.call(env)
|
28
31
|
end
|
29
32
|
result
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Minond
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentracing
|
@@ -147,7 +147,7 @@ homepage: https://github.com/mxenabled/action_subscriber-opentracing
|
|
147
147
|
licenses:
|
148
148
|
- MIT
|
149
149
|
metadata: {}
|
150
|
-
post_install_message:
|
150
|
+
post_install_message:
|
151
151
|
rdoc_options: []
|
152
152
|
require_paths:
|
153
153
|
- lib
|
@@ -162,8 +162,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
|
-
rubygems_version: 3.
|
166
|
-
signing_key:
|
165
|
+
rubygems_version: 3.3.13
|
166
|
+
signing_key:
|
167
167
|
specification_version: 4
|
168
168
|
summary: ActionSubscriber
|
169
169
|
test_files: []
|