Skip to content

Add dynamic_service DBM propagation mode#3940

Merged
bwoebi merged 4 commits into
masterfrom
andrea.marziali/dbm-dynamic-service
Jun 5, 2026
Merged

Add dynamic_service DBM propagation mode#3940
bwoebi merged 4 commits into
masterfrom
andrea.marziali/dbm-dynamic-service

Conversation

@amarziali
Copy link
Copy Markdown
Contributor

Description

Introduces a new DBM propagation mode value, dynamic_service, as a convenience alias for the combination of DD_DBM_PROPAGATION_MODE=service and DD_DBM_INJECT_SQL_BASEHASH=true. With a single setting, users get service-level SQL comment propagation (dddbs, ddps, etc.) plus the process-tags base hash injected as ddsh in the SQL comment and _dd.propagated_hash on the span, without needing to manage two separate variables.

Behavior:

  • Same as service mode: no traceparent header, no _dd.dbm_trace_injected span tag
  • Base hash (ddsh / _dd.propagated_hash) is always injected regardless of DD_DBM_INJECT_SQL_BASEHASH

Please note that this mode will replace service on the long term (and hence eventually also the DD_DBM_INJECT_SQL_BASEHASH will be deprecated/removed at same time)

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@amarziali amarziali requested review from a team as code owners May 29, 2026 07:16
@amarziali amarziali added the 🏆 enhancement A new feature or improvement label May 29, 2026
@amarziali amarziali requested review from LobeTia and removed request for a team May 29, 2026 07:16
@amarziali amarziali added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label May 29, 2026
@amarziali amarziali requested a review from raphaelgavache May 29, 2026 07:16
@datadog-datadog-prod-us1
Copy link
Copy Markdown

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

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 6 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-php | ASAN test_c with multiple observers: [8.5]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | benchmarks-tracer   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-php | helper-rust integration coverage   View in Datadog   GitLab

View all 6 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 54.12% (-0.03%)

Useful? React with 👍 / 👎

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

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 29, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-06-05 16:12:55

Comparing candidate commit 1c2af13 in PR branch andrea.marziali/dbm-dynamic-service with baseline commit 87f1683 in branch master.

Found 1 performance improvements and 4 performance regressions! Performance is the same for 189 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:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟩 execution_time [-5.130µs; -3.850µs] or [-4.620%; -3.467%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+90.062ns; +163.738ns] or [+6.208%; +11.286%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+115.551ns; +161.649ns] or [+8.021%; +11.220%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+87.189ns; +152.011ns] or [+6.000%; +10.461%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+78.151ns; +166.249ns] or [+5.376%; +11.437%]

Comment thread src/DDTrace/Integrations/DatabaseIntegrationHelper.php
@bwoebi bwoebi force-pushed the andrea.marziali/dbm-dynamic-service branch from 36e2576 to 59ce771 Compare May 29, 2026 13:46
@amarziali amarziali force-pushed the andrea.marziali/dbm-dynamic-service branch 2 times, most recently from e7a2006 to 1c2af13 Compare June 5, 2026 14:51
Copy link
Copy Markdown
Collaborator

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@bwoebi bwoebi force-pushed the andrea.marziali/dbm-dynamic-service branch from d56241f to 5a83168 Compare June 5, 2026 17:18
@bwoebi bwoebi merged commit 5b3430b into master Jun 5, 2026
2115 of 2133 checks passed
@bwoebi bwoebi deleted the andrea.marziali/dbm-dynamic-service branch June 5, 2026 18:03
@github-actions github-actions Bot added this to the 1.21.0 milestone Jun 5, 2026
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 🏆 enhancement A new feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants