logasm-tracer 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -3
- data/lib/logasm/tracer.rb +18 -10
- data/lib/logasm/tracer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8ad023a2a2edee7c4afedfabc7c0360fdb67478
|
4
|
+
data.tar.gz: 6354fdc4fe322772f034ab23871e31165ae68658
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 506c43d7d5723d79de45ba8e15d52127cc8e58b41f9e2688fca3116ba30a36b3eff45d2c198ea09c418cfdd6f7c662bbf80562d913d8137ccb1ada29269a325a
|
7
|
+
data.tar.gz: ccd00af5997425855936c786df27690b0876ef271b54cbdb7d74122698c33d707eda62eed9e9eaaa964a58a3a06f262347ce25af5634a22fdac28884706d67d9
|
data/.travis.yml
CHANGED
data/lib/logasm/tracer.rb
CHANGED
@@ -67,17 +67,25 @@ class Logasm
|
|
67
67
|
def extract(format, carrier)
|
68
68
|
case format
|
69
69
|
when FORMAT_TEXT_MAP
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
trace_id = carrier['trace-id']
|
71
|
+
parent_id = carrier['parent-id']
|
72
|
+
span_id = carrier['span-id']
|
73
|
+
|
74
|
+
if trace_id && span_id
|
75
|
+
SpanContext.new(trace_id: trace_id, parent_id: parent_id, span_id: span_id)
|
76
|
+
else
|
77
|
+
nil
|
78
|
+
end
|
75
79
|
when FORMAT_RACK
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
80
|
+
trace_id = carrier['X-Trace-Id']
|
81
|
+
parent_id = carrier['X-Trace-Parent-Id']
|
82
|
+
span_id = carrier['X-Trace-Span-Id']
|
83
|
+
|
84
|
+
if trace_id && span_id
|
85
|
+
SpanContext.new(trace_id: trace_id, parent_id: parent_id, span_id: span_id)
|
86
|
+
else
|
87
|
+
nil
|
88
|
+
end
|
81
89
|
else
|
82
90
|
@logger.error "Logasm::Tracer with format #{format} is not supported yet"
|
83
91
|
nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logasm-tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaleMove TechMovers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|