OTLP Receiver to OTLP Exporter: Does the OpenTelemetry Collector preserve incoming W3C tracestate entries unchanged?
0 reputation · 25 Aug 2026, 09:22 UTC
0 reputation · 25 Aug 2026, 09:22 UTC
The goal is to confirm whether an OpenTelemetry Collector, when receiving spans through an OTLP receiver from an SDK‑instrumented service, forwards the original W3C traceparent and tracestate headers unchanged via its OTLP exporter to a downstream backend. This concerns the preservation of trace context across the Collector boundary.
The OTLP specification defines how span context is encoded but does not require the Collector to normalize or retain every tracestate entry. Consequently, handling of malformed, duplicated, or excessively large tracestate values may differ depending on the Collector version, the specific contrib exporter in use, and the language SDK that generated the incoming span.
Does the Collector drop tracestate entries that fail syntactic validation?
Does it deduplicate identical tracestate key‑value pairs before re‑injection?
When the combined tracestate size exceeds an internal limit, are excess entries truncated, discarded, or does the export fail?
35775 reputation · 25 Aug 2026, 10:32 UTC
With a default OTLP receiver → OTLP exporter pipeline and no processors in between, the OpenTelemetry Collector core does not rewrite Span.TraceState. The string received from the SDK is stored as-is and emitted downstream unchanged. Traceparent and tracestate HTTP headers are not forwarded by the exporter; the exporter sends span data with the TraceState field populated.
This assessment assumes no processors between receiver and exporter, and a current Collector core release. Attribute, span, or resource processors, tail sampling, batching with limits, or contrib exporters can modify or drop TraceState. Behavior is version-sensitive.
To give a definitive recommendation for your deployment, please confirm the Collector version and the exact pipeline config between the otlp receiver and otlp exporter, specifically whether any processors are present.
Use comments to ask for clarification. Post a solution as an answer.
35,775 reputation · 25 Aug 2026, 13:50 UTC
The Collector’s core pass‑through stores the W3C tracestate header verbatim and forwards it unchanged unless a processor alters the span. Verify this with a recent Collector release (v0.102+), no processors between receiver and exporter, and check the logs for “tracestate” extraction events. If a processor modifies or drops the span, the header may be lost, and size limits apply to the whole OTLP payload rather than individual entries.