zipkin-tracer 0.22.0 → 0.23.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17ea0ff62e644d02b42274491b09f3227c8e8609
|
4
|
+
data.tar.gz: ce92768b4d619d4a72c729af05246c9aafc4edf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5f70bce1a97b561a1b68937d6674ad7854574ab786360c6970ac7cf7124aecd0c36a95724f4ca2d8a80b34e64e4351af32a7ab0f0a2f8bafa47e917288a97cd
|
7
|
+
data.tar.gz: 640149e01616e7d9f4e1867608e539c8a54e1b7b552e9217c65c7223c86985b189218ad225cae874cd025846b9b7b77f3ebbefdc37bbe8e9bb5f3364789449d6
|
@@ -38,6 +38,7 @@ module ZipkinTracer
|
|
38
38
|
)
|
39
39
|
end
|
40
40
|
span.record(Trace::Annotation::CLIENT_RECV, local_endpoint)
|
41
|
+
Trace.tracer.end_span(span)
|
41
42
|
end
|
42
43
|
|
43
44
|
super(datum)
|
@@ -78,15 +79,14 @@ module ZipkinTracer
|
|
78
79
|
url = URI(url_string)
|
79
80
|
service_name = service_name(datum, url.host)
|
80
81
|
|
81
|
-
Trace.tracer.
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
82
|
+
span = Trace.tracer.start_span(trace_id, datum[:method].to_s.downcase)
|
83
|
+
# annotate with method (GET/POST/etc.) and uri path
|
84
|
+
span.record_tag(Trace::BinaryAnnotation::PATH, url.path, Trace::BinaryAnnotation::Type::STRING, local_endpoint)
|
85
|
+
span.record_tag(Trace::BinaryAnnotation::SERVER_ADDRESS, SERVER_ADDRESS_SPECIAL_VALUE, Trace::BinaryAnnotation::Type::BOOL, remote_endpoint(url, service_name))
|
86
|
+
span.record(Trace::Annotation::CLIENT_SEND, local_endpoint)
|
86
87
|
|
87
|
-
|
88
|
-
|
89
|
-
end
|
88
|
+
# store the span in the datum hash so it can be used in the response_call
|
89
|
+
datum[:span] = span
|
90
90
|
rescue ArgumentError, URI::Error => e
|
91
91
|
# Ignore URI errors, don't trace if there is no URI
|
92
92
|
end
|
@@ -4,8 +4,18 @@ module Trace
|
|
4
4
|
# the NullTracer also.
|
5
5
|
class NullTracer
|
6
6
|
def with_new_span(trace_id, name)
|
7
|
-
span =
|
8
|
-
yield span
|
7
|
+
span = start_span(trace_id, name)
|
8
|
+
result = yield span
|
9
|
+
end_span(span)
|
10
|
+
result
|
11
|
+
end
|
12
|
+
|
13
|
+
def start_span(trace_id, name)
|
14
|
+
Span.new(name, trace_id)
|
15
|
+
end
|
16
|
+
|
17
|
+
def end_span(span)
|
18
|
+
span.close if span.respond_to?(:close)
|
9
19
|
end
|
10
20
|
|
11
21
|
def flush!
|
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.23.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: 2017-
|
16
|
+
date: 2017-05-22 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: faraday
|