You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
fa8e48ba88
Closes #7436 Span.Flags should include: Bits 0–7: span’s W3C TraceFlags (e.g., sampled) Bits 8–9: “has parent isRemote” and “parent isRemote” per OTLP spec Update the trace exporter to include the span’s W3C trace flags in the lower 8 bits and keep the existing 8–9 isRemote logic. Conceptually: For spans: flags := uint32(sd.SpanContext().TraceFlags() & 0xff) Always set SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK If sd.Parent().IsRemote(), also set SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK Assign s.Flags = flags Apply the same for links using the link’s SpanContext.TraceFlags() for bits 0–7 and the link’s SpanContext.IsRemote() for bits 8–9. --------- Co-authored-by: Damien Mathieu <42@dmathieu.com>