diff --git a/lib/lightstep/tracer/client_span.rb b/lib/lightstep/tracer/client_span.rb index 1721d1b..b008cc6 100644 --- a/lib/lightstep/tracer/client_span.rb +++ b/lib/lightstep/tracer/client_span.rb @@ -106,6 +106,7 @@ class ClientSpan rec = SpanRecord.new(runtime_guid: @tracer.guid.to_s, span_guid: @guid.to_s, + trace_guid: @trace_guid.to_s, span_name: @operation.to_s, attributes: attributes, oldest_micros: @start_micros.to_i, diff --git a/spec/lightstep_spec.rb b/spec/lightstep_spec.rb index b451058..5ae3755 100644 --- a/spec/lightstep_spec.rb +++ b/spec/lightstep_spec.rb @@ -91,6 +91,11 @@ describe LightStep do children2.each(&:finish) parent1.finish parent2.finish + + (children1.concat children2).each do |child| + thrift_data = child.to_thrift + expect(thrift_data.trace_guid).to eq(child.trace_guid) + end end it 'should handle all valid payloads types' do