Skip to content

Add dynamic_service DBM propagation mode#3940

Open
amarziali wants to merge 2 commits into
masterfrom
andrea.marziali/dbm-dynamic-service
Open

Add dynamic_service DBM propagation mode#3940
amarziali wants to merge 2 commits into
masterfrom
andrea.marziali/dbm-dynamic-service

Conversation

@amarziali
Copy link
Copy Markdown

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

🚦 43 Pipeline jobs failed

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

See error Composer could not resolve dependencies due to security advisories affecting laravel/framework.

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [7.0]   View in Datadog   GitLab

See error Failed to install live debugger span decoration probe in debugger_span_decoration_probe.phpt.

DataDog/apm-reliability/dd-trace-php | test_extension_ci: [7.4]   View in Datadog   GitLab

See error Test failure in crashtracker_collect_all_threads.phpt: Job failed due to a crash when collect_all_threads was enabled.

View all 43 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 1 job - 1 passed on retry View in Datadog

🎯 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: e7a2006 | 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-05-29 15:05:32

Comparing candidate commit 59ce771 in PR branch andrea.marziali/dbm-dynamic-service with baseline commit 095538e in branch master.

Found 0 performance improvements and 4 performance regressions! Performance is the same for 189 metrics, 1 unstable metrics.

scenario:MessagePackSerializationBench/benchMessagePackSerialization

  • 🟥 execution_time [+3.507µs; +6.573µs] or [+3.459%; +6.483%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟥 execution_time [+2.353µs; +4.307µs] or [+2.314%; +4.235%]

scenario:PDOBench/benchPDOOverhead

  • 🟥 execution_time [+6.837µs; +9.191µs] or [+2.775%; +3.731%]

scenario:PDOBench/benchPDOOverheadWithDBM

  • 🟥 execution_time [+7.562µs; +10.536µs] or [+3.074%; +4.284%]

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 from 59ce771 to e7a2006 Compare June 4, 2026 07:36
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.

2 participants