Repository navigation
[Configuration] Ignore unsupported OTEL_PROPAGATORS values with a warning - #9515
MilanGarnier wants to merge 3 commits into
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aafd374409
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
BenchmarksBenchmark execution time: 2026-10-26 10:41:06 Comparing candidate commit 15bfd58 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 70 metrics, 0 unstable metrics, 16 known flaky benchmarks, 110 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (9515) and master. ✅ No regressions detected |
There was a problem hiding this comment.
With the default composite configuration source, OTEL_PROPAGATORS=jaeger falls back to defaults but emits neither the promised warning nor the OpenTelemetryConfigInvalid metric.
🤖 Bits Code Review · Commit 15bfd58
| .WithKeys(ConfigurationKeys.OpenTelemetry.Propagators) | ||
| .GetAsClassResult( | ||
| validator: injectionValidator, // invalid individual values are rejected later | ||
| validator: styles => styles.Any(IsSupportedOtelPropagator), |
There was a problem hiding this comment.
Preserve invalid propagators through composite source resolution
With the default composite configuration source and only OTEL_PROPAGATORS=jaeger configured, this validator rejects the value. CompositeConfigurationSource.GetAs discards invalid results and returns NotFound when no source validates, so the new IsPresent branch never emits the promised warning or OpenTelemetryConfigInvalid metric. Propagation falls back to defaults silently. Preserve invalid presence when no source validates while retaining fallback to valid lower-priority sources, and cover the unsupported-only composite case. This requires changes beyond a localized replacement in this diff.
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
What each reaction means
- 👍 Useful: correct, and you're fixing it or will.
- 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
- 😕 Unclear: you can't tell what it means or why it matters.
- 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.
🤖 Bits Code Review · Open Bits AI session
There was a problem hiding this comment.
This issue seems to be gue to composite config, fix proposed in #9522
Summary of changes
Unsupported/invalid values in
OTEL_PROPAGATORS(e.g.jaeger,ottrace,xray,typos) are now dropped with a warning that names them. If no supported value
remains, the default propagators are used, as when the variable is unset.
Reason for change
Today invalid/unsupported propagators are accepted silently: a mixed config like
tracecontext,baggage,jaegerlosesjaegerwithout any log, and a config madeonly of unsupported values (
OTEL_PROPAGATORS=jaeger) leaves the tracer with noinjectors or extractors, so propagation is silently disabled. Logging a warning + falling back if no valid propagators are left should make onboarding OTel customers easier.
(+theoretically, OTel spec requires unrecognized propagators to be ignored with a warning).
Jira: APMAPI-2623
Implementation details
OTEL_PROPAGATORSvalidator inTracerSettingsnow requires at least onesupported propagator (one
SpanContextPropagatorFactorycan create, ornone). Otherwise the existing override path applies the defaults, logs theinvalid-configuration warning and records
OpenTelemetryConfigInvalid.resolution, not in the converter, which runs once per source and would
report values from unused sources.
OverrideErrorLog.LogUnsupportedValuesqueues the warning and recordsOpenTelemetryConfigInvalid. It also runs whenDD_TRACE_PROPAGATION_STYLE*hides
OTEL_PROPAGATORS.Test coverage
TracerSettingsTests: new cases forPropagationStyleInject/PropagationStyleExtract, plus warning tests for unsupported values andfor source selection.
Test_OTEL_PROPAGATORS::test_invalid_{is_ignored|value_logs_warning}now pass