zipkin-tracer 0.29.1 → 0.30.0
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: b3baf1dff1d2fa511cec7a66a040c4e817bb100d4e8984834d0471f8a1118d51
|
4
|
+
data.tar.gz: b2047d302ad9d4c50f265c33f640a03d02a6223379707c8146995667812dc023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bfaaf722dcdad67fcb795db85cbaac6ab5b6234e76569d17982098ec38059e9d7f9fb5167ed0c0e177ff9857d987dbe68ab780e8dbfef0fc18e220dbb784664
|
7
|
+
data.tar.gz: 8ddb0aba5a360756b11015aea6d13949a14d4653de0123664f7e7264c8e67655544cea722002d098358bef67e476be7ecdc6747a214b93886fdab9a76828997d
|
@@ -80,12 +80,14 @@ module ZipkinTracer
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def trace!(datum, trace_id)
|
83
|
+
method = datum[:method].to_s
|
83
84
|
url_string = Excon::Utils::request_uri(datum)
|
84
85
|
url = URI(url_string)
|
85
86
|
service_name = service_name(datum, url.host)
|
86
87
|
|
87
|
-
span = Trace.tracer.start_span(trace_id,
|
88
|
+
span = Trace.tracer.start_span(trace_id, method.downcase)
|
88
89
|
# annotate with method (GET/POST/etc.) and uri path
|
90
|
+
span.record_tag(Trace::BinaryAnnotation::METHOD, method.upcase, Trace::BinaryAnnotation::Type::STRING, local_endpoint)
|
89
91
|
span.record_tag(Trace::BinaryAnnotation::PATH, url.path, Trace::BinaryAnnotation::Type::STRING, local_endpoint)
|
90
92
|
span.record_tag(Trace::BinaryAnnotation::SERVER_ADDRESS, SERVER_ADDRESS_SPECIAL_VALUE, Trace::BinaryAnnotation::Type::BOOL, remote_endpoint(url, service_name))
|
91
93
|
span.record(Trace::Annotation::CLIENT_SEND, local_endpoint)
|
@@ -44,12 +44,14 @@ module ZipkinTracer
|
|
44
44
|
def trace!(env, trace_id)
|
45
45
|
response = nil
|
46
46
|
# handle either a URI object (passed by Faraday v0.8.x in testing), or something string-izable
|
47
|
+
method = env[:method].to_s
|
47
48
|
url = env[:url].respond_to?(:host) ? env[:url] : URI.parse(env[:url].to_s)
|
48
49
|
local_endpoint = Trace.default_endpoint # The rack middleware set this up for us.
|
49
50
|
remote_endpoint = Trace::Endpoint.remote_endpoint(url, @service_name, local_endpoint.ip_format) # The endpoint we are calling.
|
50
|
-
Trace.tracer.with_new_span(trace_id,
|
51
|
+
Trace.tracer.with_new_span(trace_id, method.downcase) do |span|
|
51
52
|
@span = span # So we can record on exceptions
|
52
53
|
# annotate with method (GET/POST/etc.) and uri path
|
54
|
+
span.record_tag(Trace::BinaryAnnotation::METHOD, method.upcase, Trace::BinaryAnnotation::Type::STRING, local_endpoint)
|
53
55
|
span.record_tag(Trace::BinaryAnnotation::PATH, url.path, Trace::BinaryAnnotation::Type::STRING, local_endpoint)
|
54
56
|
span.record_tag(Trace::BinaryAnnotation::SERVER_ADDRESS, SERVER_ADDRESS_SPECIAL_VALUE, Trace::BinaryAnnotation::Type::BOOL, remote_endpoint)
|
55
57
|
span.record(Trace::Annotation::CLIENT_SEND, local_endpoint)
|
data/lib/zipkin-tracer/trace.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zipkin-tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franklin Hu
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2018-
|
16
|
+
date: 2018-12-06 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: faraday
|