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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3028cba0194bb363a3f2935667763cd907e183f4
4
- data.tar.gz: 0633bc43e7df50179a6fb500c6a27e68c391a070
3
+ metadata.gz: a8ad023a2a2edee7c4afedfabc7c0360fdb67478
4
+ data.tar.gz: 6354fdc4fe322772f034ab23871e31165ae68658
5
5
  SHA512:
6
- metadata.gz: '08ad18e49d2077a520beb2932edc47798a340145318b4856568fe2bcd369f01272d8da065b43dfacfdcd87a58c763f84503d06b9167b93531f164056dc21eb9e'
7
- data.tar.gz: b27235706f5cb987c2f52c250addfb1125fde317a77b69f36aac20fd48c1545af0c2d3190cfcbd2df2b950f9abf08fadec0c9611667cd20c920add944e2850b7
6
+ metadata.gz: 506c43d7d5723d79de45ba8e15d52127cc8e58b41f9e2688fca3116ba30a36b3eff45d2c198ea09c418cfdd6f7c662bbf80562d913d8137ccb1ada29269a325a
7
+ data.tar.gz: ccd00af5997425855936c786df27690b0876ef271b54cbdb7d74122698c33d707eda62eed9e9eaaa964a58a3a06f262347ce25af5634a22fdac28884706d67d9
@@ -1,5 +1,6 @@
1
- sudo: false
2
1
  language: ruby
3
2
  rvm:
4
- - 2.4.0
5
- before_install: gem install bundler -v 1.14.4
3
+ - 2.4.1
4
+ - jruby-9.1.5.0
5
+ before_install: gem install bundler
6
+ script: bundle exec rspec
@@ -67,17 +67,25 @@ class Logasm
67
67
  def extract(format, carrier)
68
68
  case format
69
69
  when FORMAT_TEXT_MAP
70
- SpanContext.new(
71
- trace_id: carrier['trace-id'],
72
- parent_id: carrier['parent-id'],
73
- span_id: carrier['span-id']
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
- SpanContext.new(
77
- trace_id: carrier['X-Trace-Id'],
78
- parent_id: carrier['X-Trace-Parent-Id'],
79
- span_id: carrier['X-Trace-Span-Id']
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
@@ -1,5 +1,5 @@
1
1
  class Logasm
2
2
  class Tracer
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
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.0
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-03-30 00:00:00.000000000 Z
11
+ date: 2017-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler