Skip to content

fix(otel): supress invalid env not supported warnings#18194

Open
mabdinur wants to merge 2 commits into
mainfrom
munir/add-otel-configs-to-allowlist
Open

fix(otel): supress invalid env not supported warnings#18194
mabdinur wants to merge 2 commits into
mainfrom
munir/add-otel-configs-to-allowlist

Conversation

@mabdinur
Copy link
Copy Markdown
Contributor

@mabdinur mabdinur commented May 20, 2026

Description

Adds OTEL_METRIC_EXPORT_TIMEOUT, OTEL_OTLP_HEADERS, OTEL_OTLP_PROTOCOL, OTEL_OTLP_TIMEOUT, and OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE to SUPPORTED_OTEL_ENV_VARS in ddtrace/internal/settings/_otel_remapper.py. These are valid OpenTelemetry SDK variables listed in supported-configurations.json but 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 in supported-configurations.json against SUPPORTED_OTEL_ENV_VARS and ENV_VAR_MAPPINGS; all entries are now accounted for.

@mabdinur mabdinur marked this pull request as ready for review May 20, 2026 18:31
@mabdinur mabdinur requested review from a team as code owners May 20, 2026 18:31
@mabdinur mabdinur requested a review from rachelyangdog May 20, 2026 18:31
@mabdinur mabdinur requested a review from florentinl May 20, 2026 18:31
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

Codeowners resolved as

ddtrace/internal/settings/_otel_remapper.py                             @DataDog/apm-sdk-capabilities-python
releasenotes/notes/add-otel-configs-to-allowlist-bcf2be5c9ed79b61.yaml  @DataDog/apm-python

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +139 to +141
"OTEL_OTLP_HEADERS",
"OTEL_OTLP_PROTOCOL",
"OTEL_OTLP_TIMEOUT",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@datadog-datadog-prod-us1
Copy link
Copy Markdown
Contributor

datadog-datadog-prod-us1 Bot commented May 20, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 8 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | build linux serverless: [arm64, cp315-cp315, v113741589-d2b8243-musllinux_1_2_aarch64, 1]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). AssertionError: Failed with DD_IAST_ENABLED=0: 1

DataDog/apm-reliability/dd-trace-py | build linux: [arm64, cp315-cp315, v113741589-d2b8243-musllinux_1_2_aarch64]   View in Datadog   GitLab

🔧 Fix in code (Fix with Cursor). AssertionError: Failed with DD_IAST_ENABLED=0: 1

DataDog/apm-reliability/dd-trace-py | build linux serverless: [amd64, cp315-cp315, v113741238-d2b8243-manylinux2014_x86_64, 1]   View in Datadog   GitLab

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. NotImplementedError: This version of CPython is not supported yet

View all 8 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 55427b4 | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant