fix(otel): supress invalid env not supported warnings#18194
Conversation
Codeowners resolved as |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55427b449f
ℹ️ 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".
| "OTEL_OTLP_HEADERS", | ||
| "OTEL_OTLP_PROTOCOL", | ||
| "OTEL_OTLP_TIMEOUT", |
There was a problem hiding this comment.
Don't suppress warnings for ignored OTEL_OTLP_ variables*
When a user sets OTEL_OTLP_PROTOCOL, OTEL_OTLP_HEADERS, or OTEL_OTLP_TIMEOUT, validate_otel_envs() now treats it as supported because it is in this allowlist, but the exporter config only reads the OTEL_EXPORTER_OTLP_* and signal-specific names. That makes these unsupported/typoed variables silently ignored instead of emitting the unsupported warning this allowlist controls; either wire them as aliases or keep warning on them.
Useful? React with 👍 / 👎.
|
Description
Adds
OTEL_METRIC_EXPORT_TIMEOUT,OTEL_OTLP_HEADERS,OTEL_OTLP_PROTOCOL,OTEL_OTLP_TIMEOUT, andOTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCEtoSUPPORTED_OTEL_ENV_VARSinddtrace/internal/settings/_otel_remapper.py. These are valid OpenTelemetry SDK variables listed insupported-configurations.jsonbut were missing from the allowlist, causing an inaccurate"OpenTelemetry configuration ... is not supported by Datadog"warning at startup.Testing
Existing OTel remapper/telemetry validation tests cover the allowlist path; no behavior change beyond suppressing the false-positive warning for these five variables.
Risks
None. Allowlist-only change — no remapping logic, defaults, or public API are affected.
Additional Notes
Audited every
OTEL_*key insupported-configurations.jsonagainstSUPPORTED_OTEL_ENV_VARSandENV_VAR_MAPPINGS; all entries are now accounted for.