lhc 10.2.0 → 10.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lhc/interceptors/zipkin.rb +5 -2
- data/lib/lhc/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: 5995d465230282a514f8578d41bd62ff6013550f15408e3ff174a087d8ce8247
|
4
|
+
data.tar.gz: 574aaaa921e4f7ee9f724082d21ed2188fb8ae054645e0238a18838ad5fbf7c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4886f53416547af48f05145d1400cdd91da733eb7231e56d646232084295c6c927f2cde2c408ac9b058450964049aee2d62caf29c0096f5f36a4e6b307169fad
|
7
|
+
data.tar.gz: e06fb5be41f70e2f6cdf7009c3fe574843b47638003625edb38f3e36e311744e9e297fc21c080d978284d63039e8b5849d0f78e7f5613e923c79127ba16e354c
|
@@ -11,7 +11,7 @@ class LHC::Zipkin < LHC::Interceptor
|
|
11
11
|
TRUE = '1' # true in binary annotation
|
12
12
|
|
13
13
|
def before_request
|
14
|
-
return
|
14
|
+
return if !dependencies? || !tracing?
|
15
15
|
ZipkinTracer::TraceContainer.with_trace_id(trace_id) do
|
16
16
|
# add headers even if the current trace_id should not be sampled
|
17
17
|
B3_HEADERS.each { |method, header| request.headers[header] = trace_id.send(method).to_s }
|
@@ -28,6 +28,10 @@ class LHC::Zipkin < LHC::Interceptor
|
|
28
28
|
|
29
29
|
private
|
30
30
|
|
31
|
+
def tracing?
|
32
|
+
ZipkinTracer::TraceContainer.current
|
33
|
+
end
|
34
|
+
|
31
35
|
def start_trace!
|
32
36
|
record_path
|
33
37
|
record_remote_endpoint
|
@@ -97,7 +101,6 @@ class LHC::Zipkin < LHC::Interceptor
|
|
97
101
|
def dependencies?
|
98
102
|
(
|
99
103
|
defined?(ZipkinTracer::TraceContainer) &&
|
100
|
-
ZipkinTracer::TraceContainer.current &&
|
101
104
|
defined?(::Trace) &&
|
102
105
|
defined?(::Trace::Annotation) &&
|
103
106
|
defined?(::Trace::BinaryAnnotation) &&
|
data/lib/lhc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.2.
|
4
|
+
version: 10.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhc/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|