Skip to content

Support OpenTelemetry deployment environment names - #12324

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

Support OpenTelemetry deployment environment names#12324
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
tyler.finethy/otel-environment-name

Conversation

@tylfin

@tylfin tylfin commented Aug 27, 2026

Copy link
Copy Markdown
Member

What Does This Do

Maps the stable OpenTelemetry deployment.environment.name resource attribute to the Datadog environment while retaining deployment.environment as a legacy fallback. When both attributes are present, the stable name takes precedence.

Motivation

OpenTelemetry deprecated deployment.environment in favor of deployment.environment.name. Applications using the current semantic convention were not assigned the expected Datadog environment.

Additional Notes

Validated with focused configuration tests and Spotless checks.

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the required type, component, and AI-generated labels
  • Preserve compatibility with the deprecated resource attribute

@tylfin tylfin added type: bug fix Bug fix tag: ai generated Largely based on code generated by an AI or LLM comp: config Configuration labels Aug 27, 2026
@tylfin
tylfin marked this pull request as ready for review August 27, 2026 18:10
@tylfin
tylfin requested review from a team as code owners August 27, 2026 18:10
@tylfin
tylfin requested review from mhlidd and removed request for a team August 27, 2026 18:10

@datadog-prod-us1-4 datadog-prod-us1-4 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.

Datadog Autotest: PASS

More details

The change maps deployment.environment.name to the Datadog environment. It keeps deployment.environment as a fallback and removes both keys from generic tags.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 65b75ba · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@datadog-prod-us1-4

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

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 0.00%
Overall Coverage: 58.37% (-0.43%)

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

@dd-octo-sts

dd-octo-sts Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.83 s 14.69 s [+0.1%; +1.9%] (maybe worse)
startup:insecure-bank:tracing:Agent 13.59 s 13.76 s [-2.0%; -0.4%] (maybe better)
startup:petclinic:appsec:Agent 17.40 s 16.83 s [-0.9%; +7.6%] (no difference)
startup:petclinic:iast:Agent 17.35 s 17.21 s [-3.7%; +5.3%] (no difference)
startup:petclinic:profiling:Agent 17.25 s 16.77 s [-1.5%; +7.3%] (no difference)
startup:petclinic:sca:Agent 16.90 s 17.22 s [-6.2%; +2.4%] (no difference)
startup:petclinic:tracing:Agent 16.16 s 16.23 s [-6.2%; +5.4%] (unstable)

Commit: 7c2b26c3 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@zacharycmontoya zacharycmontoya 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.

Functionally, LGTM so we can understand either OTel convention for specifying the application environment. I'd love to get a Java reviewer to confirm the testing strategy

@mhlidd mhlidd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM following an additional test case.

Comment thread internal-api/src/test/groovy/datadog/trace/api/ConfigTest.groovy
@tylfin
tylfin force-pushed the tyler.finethy/otel-environment-name branch from 65b75ba to 7c2b26c Compare August 27, 2026 18:44
@tylfin
tylfin enabled auto-merge August 27, 2026 19:22
@tylfin
tylfin added this pull request to the merge queue Aug 27, 2026
@dd-octo-sts

dd-octo-sts Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Aug 27, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-08-27 19:27:42 UTC ℹ️ Start processing command /merge


2026-08-27 19:27:48 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-08-27 20:37:02 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 27, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 8ca899c into master Aug 27, 2026
601 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the tyler.finethy/otel-environment-name branch August 27, 2026 20:37
@github-actions github-actions Bot added this to the 1.66.0 milestone Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: config Configuration tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants