protobuf-opentracing 1.0.5 → 1.0.6
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: d43d3f0fc311124668b0d6126575c8d79fa768f2c210714127b2aa5e4acf34da
|
4
|
+
data.tar.gz: d911ce8b56fefe713f3edaf21258629e5f5c311510a8c174b200d6c594d389f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9227f46fef433ed4912ecc324deb95bd25e71bdc63865bf4e79b530337705608446484ad95c062e664d005ef3ac06e2a11e1854b2c098d8cdb0cad1291c725da
|
7
|
+
data.tar.gz: a56664864fd6188b64ef5e2b57fd9de61b7cf1dbfddb4be7102a4def0a90ca0f1be2c4e1e17085572c04d56a7260424ceffd43ccb3d1437f8b2ecff5e392ee4c
|
@@ -8,13 +8,15 @@ module Protobuf
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def call(env)
|
11
|
-
operation = "#{env.service_name}##{env.method_name}"
|
11
|
+
operation = "RPC #{env.service_name}##{env.method_name}"
|
12
12
|
headers = request_headers(env)
|
13
13
|
parent = ::OpenTracing.extract(::OpenTracing::FORMAT_TEXT_MAP, headers)
|
14
14
|
options = {}
|
15
15
|
options[:child_of] = parent unless parent.nil?
|
16
|
-
options[:tags] = {
|
17
|
-
|
16
|
+
options[:tags] = {
|
17
|
+
"span.kind" => "server",
|
18
|
+
"component" => "Protobuf",
|
19
|
+
}
|
18
20
|
result = nil
|
19
21
|
|
20
22
|
::OpenTracing.start_active_span(operation, options) do
|
@@ -11,12 +11,13 @@ module Protobuf
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def operation_name
|
14
|
-
@operation_name ||= "#{options[:service]}##{options[:method]}"
|
14
|
+
@operation_name ||= "RPC #{options[:service]}##{options[:method]}"
|
15
15
|
end
|
16
16
|
|
17
17
|
def start_span
|
18
18
|
tags = {
|
19
19
|
"span.kind" => "client",
|
20
|
+
"component" => "Protobuf",
|
20
21
|
}
|
21
22
|
if ::OpenTracing.active_span
|
22
23
|
::OpenTracing.start_span(operation_name, :tags => tags)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf-opentracing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
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: activesupport
|