zipkin-tracer 0.32.1 → 0.32.2

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: 6c066e9ebc9b2f7b8ce37729594675729d37801419c1a8a4e0eeede6029bf05a
4
- data.tar.gz: e445e7d3dd07a5a81730b9ded0111dce4ab20c4e42b263eca81cae2e4329dd19
3
+ metadata.gz: 72b2330628832818e8f4d9ec7724189d6da046b548e2663a408d3290758099fa
4
+ data.tar.gz: 9c98fcc6d06760279697644e79be7286156cb58a45e0c615043fc9165394e6ff
5
5
  SHA512:
6
- metadata.gz: 902df5d34b3e4ab6fe2c4700fa68d54fd70a70ee74b744155102cf0cef5f54a44e70f355c221f08bbfb3f7bafc45cea83a51f6a347f7478dff0186b543595514
7
- data.tar.gz: e8a4248c3fe1e011d69772dac3c09bb8b21c4234138afbeb370a5714b2817ba5c82e0f7fd8ce49a46785ace994fc094e6c60f366c14e88411ce93a194cf1ac99
6
+ metadata.gz: 91dd98e7ad7a78ded2acb28040778602783062abb6add388d823afa409875606f2c9b2b9c3023279aee37ce6151190997043e5dfcfdd0b374f6593c3d91b5fda
7
+ data.tar.gz: 79c197180042a471b41f4977c1915241089eaf1d3bee6bd42c5ae84b3c1f20cc5339125a50de978f1cb417bb8a0251c79d5a6320cbe8acf53c1dee1318f22093
@@ -10,9 +10,11 @@ module Trace
10
10
  extend self
11
11
  attr_accessor :trace_id_128bit
12
12
 
13
- # This method is deprecated, please use TraceContainer.current
13
+ # This method is deprecated, please use TraceGenerator.current
14
+ # Note that this method will always return a trace, it will
15
+ # generate a new one if none was available.
14
16
  def id
15
- ZipkinTracer::TraceContainer.current
17
+ ZipkinTracer::TraceGenerator.current
16
18
  end
17
19
 
18
20
  def self.tracer
@@ -10,6 +10,14 @@ module ZipkinTracer
10
10
  end
11
11
  end
12
12
 
13
+ def current
14
+ if TraceContainer.tracing_information_set?
15
+ TraceContainer.current
16
+ else
17
+ generate_trace_id
18
+ end
19
+ end
20
+
13
21
  def generate_trace_id
14
22
  span_id = generate_id
15
23
  Trace::TraceId.new(generate_id_from_span_id(span_id), nil, span_id, should_sample?.to_s, Trace::Flags::EMPTY)
@@ -1,3 +1,3 @@
1
1
  module ZipkinTracer
2
- VERSION = '0.32.1'.freeze
2
+ VERSION = '0.32.2'.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.32.1
4
+ version: 0.32.2
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: 2019-01-08 00:00:00.000000000 Z
16
+ date: 2019-01-19 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: faraday
@@ -189,7 +189,7 @@ files:
189
189
  - lib/zipkin-tracer/zipkin_tracer_base.rb
190
190
  homepage: https://github.com/openzipkin/zipkin-tracer
191
191
  licenses:
192
- - Apache
192
+ - Apache-2.0
193
193
  metadata: {}
194
194
  post_install_message:
195
195
  rdoc_options: []