Skip to content

fix(config): support OTel deployment environment name - #19901

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
tyler.finethy/otel-environment-name
Aug 27, 2026
Merged

fix(config): support OTel deployment environment name#19901
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
tyler.finethy/otel-environment-name

Conversation

@tylfin

@tylfin tylfin commented Aug 27, 2026

Copy link
Copy Markdown
Member

Description

Maps the stable OpenTelemetry deployment.environment.name resource attribute to the Datadog environment. The deprecated deployment.environment attribute remains supported as a fallback.

This ensures applications using the current OpenTelemetry semantic convention receive the expected unified environment tag.

Testing

  • Focused OpenTelemetry configuration tests on Python 3.12
  • scripts/lint checks
  • Targeted style and type checks

Risks

Low. The change adds an alias to the existing resource attribute remapping and preserves legacy behavior.

Additional Notes

Includes a customer-facing release note under the tracing scope.

@tylfin tylfin added bug Tracing Distributed Tracing AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos labels Aug 27, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

No remaining files require a CODEOWNERS review.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 27, 2026

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 3 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Aug 27, 2026

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 240 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 240 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=135)
ddtrace.llmobs._integrations.anthropic -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.profiling.scheduler -×-> ddtrace.trace  (product:profiling -> product:tracing, score=133)
ddtrace.llmobs._integrations.pydantic_ai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.llmobs._integrations.vertexai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@tylfin
tylfin marked this pull request as ready for review August 27, 2026 18:23
@tylfin
tylfin requested review from a team as code owners August 27, 2026 18:23
@tylfin
tylfin requested a review from mabdinur August 27, 2026 18:23

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

Copy link
Copy Markdown

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: a6827a180f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ddtrace/internal/settings/_otel_remapper.py
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f3c41be | Docs | View more details | Give us feedback!

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

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos bug Tracing Distributed Tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants