Skip to content

fix: support stable OTel deployment environment - #4148

Draft
bm1549 wants to merge 1 commit into
masterfrom
brian.marks/otel-deployment-environment-name
Draft

fix: support stable OTel deployment environment#4148
bm1549 wants to merge 1 commit into
masterfrom
brian.marks/otel-deployment-environment-name

Conversation

@bm1549

@bm1549 bm1549 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Map the stable OpenTelemetry resource attribute deployment.environment.name to DD_ENV. Keep deployment.environment as a fallback and DD_ENV as the highest-precedence source.

The scanner records stable and legacy values separately so attribute order does not change the result. It consumes both environment aliases, keeps unrelated attributes, and handles the stable attribute when it is the final entry.

Related PRs:

All five focused PHPTs passed in datadog/dd-trace-ci:php-8.3_bookworm-10.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Aug 28, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 2 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | Extension Tea Tests: [8.2, debug-zts-asan] — 🔄 Retry may pass, looks flaky

View more details · View in GitLab

DataDog/apm-reliability/dd-trace-php | publish docker image for system tests

View more details · View in GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 59.62% (-1.02%)

Useful? React with 👍 / 👎

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

@pr-commenter

pr-commenter Bot commented Aug 28, 2026

Copy link
Copy Markdown

Benchmarks [ tracer ]

Benchmark execution time: 2026-08-28 16:56:46

Comparing candidate commit 0d2e8c6 in PR branch brian.marks/otel-deployment-environment-name with baseline commit e043950 in branch master.

Found 2 performance improvements and 0 performance regressions! Performance is the same for 192 metrics, 0 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:HookBench/benchHookOverheadTraceMethod-opcache

  • 🟩 execution_time [-11.445µs; -4.818µs] or [-6.329%; -2.665%]

scenario:TraceAnnotationsBench/benchTraceAnnotationOverhead-opcache

  • 🟩 execution_time [-8.305µs; -4.191µs] or [-4.572%; -2.307%]

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant