zipkin-tracer 0.41.0 → 0.42.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: fe7fb284e2e5c8aef9203ab72d41403481835e5def3b07d847e80d21ed88a653
4
- data.tar.gz: d4e8dedf195a458910af20a913f9c29256df653056cd848e6a00140be212a5ba
3
+ metadata.gz: cb2d9d53fd72f39cda64ad32aa5d578c859bf2a7b711b276cda1b080470eb2c5
4
+ data.tar.gz: b02443c6d58d469d6201ea61e7506c5548616362b54d4c2418955e640e059a25
5
5
  SHA512:
6
- metadata.gz: a8212bd6eec326a0066b5a9074a0567efd92f7ad5bbad9f88a5d7ecc0d5a607f25aaa96f9fba829fdc574c5fefb9e726763fd4a838f8551d35e744620c07e50a
7
- data.tar.gz: b7f334ab931fdc97d379ed46d199d54860dfbaf7413afa5ade8c99a9c048552338f6d3655849e6855783b54d08ef6231804368271fd79672d63e654c88371ee5
6
+ metadata.gz: '029f1d52918da350f097cef452dbb937dafd1fb12dcc42fd59c33985e2d15c9ef4a934a6f274d9b879ecd937638240773eceaec12b330cb3baacf1f72ec86f8b'
7
+ data.tar.gz: 4ef5c85dccf8d5c8ff7f4ba04cb88c33d98e11de67f5fcd56e535a2542c032abd73102ba878c0a2681dcecd7930eff5df44a33a4b61a50964153adb24ba1b15d
@@ -1,3 +1,6 @@
1
+ # 0.42.0
2
+ * Reuse existing tracer(sender) in the TraceWrapper utility class.
3
+
1
4
  # 0.41.0
2
5
  * Add support for writing B3 single header.
3
6
  * Omit ParentSpanId header for root spans.
@@ -3,13 +3,12 @@ module ZipkinTracer
3
3
  def self.wrap_in_custom_span(config, span_name, span_kind: Trace::Span::Kind::SERVER, app: nil)
4
4
  raise ArgumentError, "you must provide a block" unless block_given?
5
5
 
6
- zipkin_config = ZipkinTracer::Config.new(app, config).freeze
7
- tracer = ZipkinTracer::TracerFactory.new.tracer(zipkin_config)
6
+ initialize_tracer(app, config)
8
7
  trace_id = ZipkinTracer::TraceGenerator.new.next_trace_id
9
8
 
10
9
  ZipkinTracer::TraceContainer.with_trace_id(trace_id) do
11
10
  if trace_id.sampled?
12
- tracer.with_new_span(trace_id, span_name) do |span|
11
+ Trace.tracer.with_new_span(trace_id, span_name) do |span|
13
12
  span.kind = span_kind
14
13
  yield(span)
15
14
  end
@@ -18,5 +17,12 @@ module ZipkinTracer
18
17
  end
19
18
  end
20
19
  end
20
+
21
+ def self.initialize_tracer(app, config)
22
+ return if Trace.tracer
23
+
24
+ zipkin_config = ZipkinTracer::Config.new(app, config).freeze
25
+ ZipkinTracer::TracerFactory.new.tracer(zipkin_config)
26
+ end
21
27
  end
22
28
  end
@@ -1,3 +1,3 @@
1
1
  module ZipkinTracer
2
- VERSION = '0.41.0'.freeze
2
+ VERSION = '0.42.0'.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.41.0
4
+ version: 0.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franklin Hu
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2019-10-25 00:00:00.000000000 Z
17
+ date: 2019-11-23 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: faraday