zipkin-tracer 0.21.0 → 0.21.1

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: e002f70c008b6d4adb6dde3eb8889ca235734c90
4
- data.tar.gz: 200e21061d741afec8bee82ac70c64161296b29f
3
+ metadata.gz: ff2331d0bf009eec4d2ad99fd1264b18c6edbef3
4
+ data.tar.gz: bc787c5886223ffdd6fd896a80337dd758611cf7
5
5
  SHA512:
6
- metadata.gz: bda12147fb3da63f9c084e2cd5296c17eefdb7f5c772556cd9279b88958e8ff1e703d025eed9be11a26221882decf350e9e1d78e3dbd2afd87d1b3374ae708c3
7
- data.tar.gz: 96bf6c9f089226c241f0ad53817826bfb6983d9792594dec392ae1ff02ade9befca66807723fca937f12984640d3ae4218b5e25017484f9331738d69b6856948
6
+ metadata.gz: 34b4113f3efb6675d23b510060e596494d569c818c4f2dedefebce017c78637adeb9e5a6d4c8d46e46b7ddccab838c80f3c11de41c0d673192a15b04a290c85a
7
+ data.tar.gz: dba928621899ace87dd25bc3754c7fe338414d2306c446d6fdc5c2e7e61622a2797f644e964bccc19c3738f523c94474b1c0a9ef14b4a078dbc6d87c27b9814f
@@ -28,10 +28,15 @@ module ZipkinTracer
28
28
  end
29
29
 
30
30
  def response_call(datum)
31
- response = datum[:response]
32
-
33
31
  if span = datum[:span]
34
- span.record_tag(Trace::BinaryAnnotation::STATUS, response[:status].to_s, Trace::BinaryAnnotation::Type::STRING, local_endpoint)
32
+ if status = response_status(datum)
33
+ span.record_tag(
34
+ Trace::BinaryAnnotation::STATUS,
35
+ status,
36
+ Trace::BinaryAnnotation::Type::STRING,
37
+ local_endpoint
38
+ )
39
+ end
35
40
  span.record(Trace::Annotation::CLIENT_RECV, local_endpoint)
36
41
  end
37
42
 
@@ -64,6 +69,10 @@ module ZipkinTracer
64
69
  datum.fetch(:zipkin_service_name, default)
65
70
  end
66
71
 
72
+ def response_status(datum)
73
+ datum[:response] && datum[:response][:status] && datum[:response][:status].to_s
74
+ end
75
+
67
76
  def trace!(datum, trace_id)
68
77
  url_string = Excon::Utils::request_uri(datum)
69
78
  url = URI(url_string)
@@ -1,3 +1,3 @@
1
1
  module ZipkinTracer
2
- VERSION = '0.21.0'.freeze
2
+ VERSION = '0.21.1'.freeze
3
3
  end
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.21.0
4
+ version: 0.21.1
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-03-09 00:00:00.000000000 Z
16
+ date: 2017-03-24 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: faraday