lib/instana/instrumentation/excon.rb in instana-1.193.6 vs lib/instana/instrumentation/excon.rb in instana-1.195.0
- old
+ new
@@ -24,9 +24,14 @@
# Set request headers; encode IDs as hexadecimal strings
datum[:headers]['X-Instana-T'] = t_context.trace_id_header
datum[:headers]['X-Instana-S'] = t_context.span_id_header
+ if ::Instana.config[:w3_trace_correlation]
+ datum[:headers]['Traceparent'] = t_context.trace_parent_header
+ datum[:headers]['Tracestate'] = t_context.trace_state_header
+ end
+
@stack.request_call(datum)
end
def error_call(datum)
return @stack.error_call(datum) unless ::Instana.tracer.tracing? || !Instana.tracer.current_span.exit_span?