Repository navigation
Allow forcing trace head-sampling per DAG run via conf - #68860
Merged
Merged
Conversation
dstandish
requested review from
XD-DENG,
amoghrajesh,
ashb and
potiuk
as code owners
June 22, 2026 20:18
dstandish
marked this pull request as draft
June 22, 2026 20:18
dstandish
force-pushed
the
trace-sampled-conf-override
branch
from
June 23, 2026 19:19
7ab6331 to
087b161
Compare
Deployments running a head sampler sometimes need to guarantee a specific run is traced (debugging a flaky DAG) or excluded (a noisy run), regardless of the configured sampling ratio. A reserved run conf key, airflow/trace_sampled, provides that per-run override: true always traces the run, false never does, and absent leaves the decision to the sampler. Only an explicit bool is honored so a malformed value can neither silently change sampling nor fail run creation.
dstandish
force-pushed
the
trace-sampled-conf-override
branch
from
June 23, 2026 20:27
087b161 to
55d3904
Compare
dstandish
marked this pull request as ready for review
June 24, 2026 16:29
karenbraganz
pushed a commit
to karenbraganz/airflow
that referenced
this pull request
Jun 30, 2026
Deployments running a head sampler sometimes need to guarantee a specific run is traced (debugging a flaky DAG) or excluded (a noisy run), regardless of the configured sampling ratio. A reserved run conf key, airflow/trace_sampled, provides that per-run override: true always traces the run, false never does, and absent leaves the decision to the sampler. Only an explicit bool is honored so a malformed value can neither silently change sampling nor fail run creation.
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.
Adds a reserved run conf key,
airflow/trace_sampled, that overrides the head-sampling decision for an individual DAG run:true— always trace this runfalse— never trace itOTEL_TRACES_SAMPLER)This lets a deployment running a head sampler guarantee a specific run is traced (e.g. debugging a flaky DAG) or excluded (a noisy run) regardless of the configured sampling ratio. Only an explicit boolean is honored — strings, numbers, and other values are ignored and fall through to the sampler, so a malformed conf value can neither silently change sampling nor fail run creation.
Was built on top of #68592
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines