Skip to content

Commit

Permalink
Fixes bug using trace generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarres-mdsol committed Jan 19, 2019
1 parent c2313a5 commit 1abb634
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.32.3
* Fix bug using trace generator.

# 0.32.2
* Recover the old Trace.id logic but based not the new API. Again, for compatibility.

Expand Down
2 changes: 1 addition & 1 deletion lib/zipkin-tracer/trace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module Trace
# Note that this method will always return a trace, it will
# generate a new one if none was available.
def id
ZipkinTracer::TraceGenerator.current
ZipkinTracer::TraceGenerator.new.current
end

def self.tracer
Expand Down
2 changes: 1 addition & 1 deletion lib/zipkin-tracer/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ZipkinTracer
VERSION = '0.32.2'.freeze
VERSION = '0.32.3'.freeze
end
5 changes: 5 additions & 0 deletions spec/lib/trace_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
allow(Trace).to receive(:trace_id_128bit).and_return(trace_id_128bit)
end

it "id returns the next generator id" do
expect_any_instance_of(ZipkinTracer::TraceGenerator).to receive(:current)
Trace.id
end

describe Trace::TraceId do
let(:traceid) { '234555b04cf7e099' }
let(:span_id) { 'c3a555b04cf7e099' }
Expand Down

0 comments on commit 1abb634

Please sign in to comment.