Skip to content

Place _dd.apm.enabled:0 in every span - #343

Merged
cataphract merged 2 commits into
mainfrom
glopes/_dd.apm.enabled-everywhere
Aug 5, 2026
Merged

Place _dd.apm.enabled:0 in every span#343
cataphract merged 2 commits into
mainfrom
glopes/_dd.apm.enabled-everywhere

Conversation

@cataphract

@cataphract cataphract commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Although the RFC says otherwise (only to place it on the first span in the chunk), this is the safest way to ensure _dd.apm.enabled is encountered during processing and was the consensus decision following an incident.

Motivation

Additional Notes

Jira ticket: [PROJ-IDENT]

@pr-commenter

pr-commenter Bot commented Jul 23, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-05 14:53:05

Comparing candidate commit 02c4a48 in PR branch glopes/_dd.apm.enabled-everywhere with baseline commit 24f765c in branch main.

Found 0 performance improvements and 2 performance regressions! Performance is the same for 6 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:BM_TraceID_ParseHex/128bit

  • 🟥 execution_time [+13.704ns; +14.103ns] or [+11.188%; +11.513%]

scenario:BM_TraceID_ParseHex/64bit

  • 🟥 execution_time [+4.759ns; +4.820ns] or [+6.864%; +6.952%]

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jul 23, 2026

Copy link
Copy Markdown

Pipelines

Unblock PR with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-cpp | check-big-regressions   View in Datadog   GitLab

Development | build-windows-cmake (amd64)   View in Datadog   GitHub Actions

🔧 Fix in code. This looks caused by changes in this PR. AddressSanitizer: container-overflow detected in Catch::StringStreams::add(void) at D:\a\dd-trace-cpp\dd-trace-cpp\test\catch.hpp:13769 causing 1 failure in automated tests.
📋 Copy prompt for your agent
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Branch: glopes/_dd.apm.enabled-everywhere

Development | build-windows-cmake (amd64)
Commit: b8431b16a254cbb616f4e8b96263e28e49ea3b6e
Error (code / test):
AddressSanitizer: container-overflow detected in Catch::StringStreams::add(void) at D:\a\dd-trace-cpp\dd-trace-cpp\test\catch.hpp:13769 causing 1 failure in automated tests.
CI job: https://github.com/DataDog/dd-trace-cpp/actions/runs/31016937479/job/92343598923

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 91.75% (+0.00%)

Useful? React with 👍 / 👎

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

Comment thread src/datadog/trace_segment.cpp Outdated
Comment thread test/test_tracer.cpp Outdated
Comment thread test/test_tracer.cpp Outdated
Comment thread test/test_tracer.cpp
@cataphract
cataphract merged commit 1983698 into main Aug 5, 2026
34 of 38 checks passed
@cataphract
cataphract deleted the glopes/_dd.apm.enabled-everywhere branch August 5, 2026 15:21
@cataphract

Copy link
Copy Markdown
Contributor Author

There is flakiness in the failing test (looks like a race).

ivoanjo pushed a commit that referenced this pull request Aug 10, 2026
* Place _dd.apm.enabled:0 in every span

* address review comments
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.

2 participants