Repository navigation
tracing: make otel tracer respect envoy tracing decision - #45830
Merged
Merged
Conversation
Previously this was ignored and the parent sampling status was taken no matter the internal decision. Fixes #35721 Signed-off-by: Matt Klein <[email protected]>
agrawroh
approved these changes
Jun 24, 2026
yanavlasov
approved these changes
Jun 24, 2026
eottabom
added a commit
to eottabom/envoy
that referenced
this pull request
Nov 26, 2026
…y tracer Since envoyproxy#45830 the OpenTelemetry tracer applies Envoy's tracing decision as a final veto even when a valid parent span context is extracted. With random_sampling below 100%, requests with a sampled traceparent are dropped at the random_sampling rate. The HCM now reports whether a NotTraceable request was only not selected by random sampling and passes overall sampling (Tracing::Decision:: parent_sampling_allowed). The new opt-in OpenTelemetryConfig field honor_parent_sampling_decision keeps the parent's sampling decision in that case. Overall sampling and client sampling rejections, missing or invalid request IDs and health checks still veto. The default behavior is unchanged. Fixes envoyproxy#49638 Signed-off-by: eottabom <[email protected]>
eottabom
added a commit
to eottabom/envoy
that referenced
this pull request
Nov 26, 2026
…y tracer Since envoyproxy#45830 the OpenTelemetry tracer applies Envoy's tracing decision as a final veto even when a valid parent span context is extracted. With random_sampling below 100%, requests with a sampled traceparent are dropped at the random_sampling rate, and the traceparent injected upstream carries the vetoed sampled flag. The HCM now reports, in Tracing::Decision::parent_sampling_allowed, whether in its own evaluation random sampling did not select the request, client sampling did not reject it, and it passes overall sampling. The new opt-in OpenTelemetryConfig field honor_parent_sampling_decision keeps the parent's sampling decision in that case. Overall sampling and client sampling rejections, missing or invalid request IDs and health checks still veto. The default behavior is unchanged. Fixes envoyproxy#49638 Signed-off-by: eottabom <[email protected]>
eottabom
added a commit
to eottabom/envoy
that referenced
this pull request
Nov 26, 2026
…y tracer Since envoyproxy#45830 the OpenTelemetry tracer applies Envoy's tracing decision as a final veto even when a valid parent span context is extracted. With random_sampling below 100%, requests with a sampled traceparent are dropped at the random_sampling rate, and the traceparent injected upstream carries the vetoed sampled flag. The HCM now reports, in Tracing::Decision::parent_sampling_allowed, whether in its own evaluation random sampling did not select the request, client sampling did not reject it, and it passes overall sampling. The HCM only sets the flag when the reason is NotTraceable. The new opt-in OpenTelemetryConfig field honor_parent_sampling_decision lifts Envoy's veto in that case when the parent span context is sampled. A configured sampler can still drop the span, but it cannot sample a span whose parent is not sampled. Overall sampling and client sampling rejections and missing or invalid request IDs still veto. Requests that the health check filter marks only after the span is started are not distinguished. The default behavior is unchanged. Fixes envoyproxy#49638 Signed-off-by: eottabom <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
eottabom
added a commit
to eottabom/envoy
that referenced
this pull request
Nov 26, 2026
…y tracer Since envoyproxy#45830 the OpenTelemetry tracer applies Envoy's tracing decision as a final veto even when a valid parent span context is extracted. With random_sampling below 100%, requests with a sampled traceparent are dropped at the random_sampling rate, and the traceparent injected upstream carries the vetoed sampled flag. The HCM now reports, in Tracing::Decision::parent_sampling_allowed, whether in its own evaluation random sampling did not select the request, client sampling did not reject it, and it passes overall sampling. The HCM only sets the flag when the reason is NotTraceable. The new opt-in OpenTelemetryConfig field honor_parent_sampling_decision lifts Envoy's veto in that case when the parent span context is sampled. A configured sampler can still drop the span, but it cannot sample a span whose parent is not sampled. Overall sampling and client sampling rejections and missing or invalid request IDs still veto. Requests that the health check filter marks only after the span is started are not distinguished. The default behavior is unchanged. Fixes envoyproxy#49638 Signed-off-by: eottabom <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously this was ignored and the parent sampling status was taken no matter the internal decision.
Fixes #35721