You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OTLP trace exporter include W3C trace flags (bits 0–7) in Span.Flags (#7438)
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 <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
48
48
Now, when translation would drop data (e.g., invalid label/value), the exporter emits a `NewInvalidMetric`, and Prometheus scrapes **fail with HTTP 500** by default.
49
49
To preserve the prior behavior (scrapes succeed while errors are logged), configure your Prometheus HTTP handler with: `promhttp.HandlerOpts{ ErrorHandling: promhttp.ContinueOnError }`. (#7363)
50
50
- The default `TranslationStrategy` in `go.opentelemetry.io/exporters/prometheus` is changed from `otlptranslator.NoUTF8EscapingWithSuffixes` to `otlptranslator.UnderscoreEscapingWithSuffixes`. (#7421)
51
+
- Include W3C TraceFlags (bits 0–7) in the OTLP `Span.Flags` field in `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracehttp` and `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracegrpc`. (#7438)
51
52
- The `ErrorType` function in `go.opentelemetry.io/otel/semconv/v1.37.0` now handles custom error types.
52
53
If an error implements an `ErrorType() string` method, the return value of that method will be used as the error type. (#7442)
53
54
- Improve performance of concurrent measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7427)
0 commit comments