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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/zipkin-tracer/trace_wrapper.rb +9 -3
- data/lib/zipkin-tracer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb2d9d53fd72f39cda64ad32aa5d578c859bf2a7b711b276cda1b080470eb2c5
|
4
|
+
data.tar.gz: b02443c6d58d469d6201ea61e7506c5548616362b54d4c2418955e640e059a25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '029f1d52918da350f097cef452dbb937dafd1fb12dcc42fd59c33985e2d15c9ef4a934a6f274d9b879ecd937638240773eceaec12b330cb3baacf1f72ec86f8b'
|
7
|
+
data.tar.gz: 4ef5c85dccf8d5c8ff7f4ba04cb88c33d98e11de67f5fcd56e535a2542c032abd73102ba878c0a2681dcecd7930eff5df44a33a4b61a50964153adb24ba1b15d
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
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
|
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.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-
|
17
|
+
date: 2019-11-23 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: faraday
|