Skip to content

Adds container tags support for DBM#3708

Merged
dubloom merged 8 commits intomasterfrom
dubloom/container-back-propagation-implem
Mar 20, 2026
Merged

Adds container tags support for DBM#3708
dubloom merged 8 commits intomasterfrom
dubloom/container-back-propagation-implem

Conversation

@dubloom
Copy link
Copy Markdown
Contributor

@dubloom dubloom commented Mar 18, 2026

This PR implements the container tags support for DBM as described in this RFC.

Tracers communicate their containerID through a request http header that can be back propagate by the agent. This feature is implemented in the agent in this libdatadog PR: DataDog/libdatadog#1700.

We use this container tags hash alongside process tags to compute a hash called base_hash. This base_hash is injected in DBM comments and DBM spans.

Note that the base_hash should be computed as soon as process tags are available because if the tracer is not run within a container, it will never receive a container_tags_hash.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.73%. Comparing base (a8ee11d) to head (2dda062).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3708      +/-   ##
==========================================
- Coverage   68.74%   68.73%   -0.02%     
==========================================
  Files         166      166              
  Lines       19030    19030              
  Branches     1797     1797              
==========================================
- Hits        13082    13080       -2     
- Misses       5132     5135       +3     
+ Partials      816      815       -1     
Flag Coverage Δ
helper-rust-integration 78.82% <ø> (ø)
helper-rust-unit 49.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8ee11d...2dda062. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dubloom dubloom force-pushed the dubloom/container-back-propagation-implem branch from 99f54be to 5f12f9e Compare March 18, 2026 17:42
@dubloom dubloom marked this pull request as ready for review March 18, 2026 17:48
@dubloom dubloom requested review from a team as code owners March 18, 2026 17:48
@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented Mar 18, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

testBaseHashNotInjectedWhenDisabled from integration.DDTrace\Tests\Integration\DatabaseMonitoringTest (Datadog) (Fix with Cursor)
DDTrace
Error: Call to undefined method DDTrace

tests/Integration/DatabaseMonitoringTest.php:392
tests/Common/RetryTraitVersionSpecific70.php:28
phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:52

🧪 13 Tests failed

testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Datadog) (Fix with Cursor)
Risky Test
phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:52
testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 69bd7d4f000000004be61bafb5352f8f
tid: 69bd7d4f00000000
hexProcessTraceId: 4be61bafb5352f8f
hexProcessSpanId: 7b43ae1b6d700b7c
processTraceId: 5469089238961434511
processSpanId: 8882134322928159612

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 69bd8b3500000000039588c67a9b3f2b
tid: 69bd8b3500000000
hexProcessTraceId: 039588c67a9b3f2b
hexProcessSpanId: d37c2e95832e2627
processTraceId: 258262939685568299
processSpanId: 15239106458800760359

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
View all
This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2dda062 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Comment thread ext/fnv.c Outdated
Comment thread ext/process_tags.c Outdated
Comment thread ext/agent_info.c Outdated
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 18, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-03-20 18:08:49

Comparing candidate commit 2dda062 in PR branch dubloom/container-back-propagation-implem with baseline commit a8ee11d in branch master.

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

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟥 execution_time [+3.281µs; +4.699µs] or [+3.136%; +4.491%]

@bwoebi bwoebi force-pushed the dubloom/process-tags-rc branch 4 times, most recently from ee4cded to a3550c4 Compare March 19, 2026 15:20
Base automatically changed from dubloom/process-tags-rc to master March 19, 2026 21:52
@bwoebi bwoebi requested review from a team as code owners March 19, 2026 21:52
@dubloom dubloom force-pushed the dubloom/container-back-propagation-implem branch from 1317582 to 0534aa3 Compare March 20, 2026 09:37
@dubloom dubloom force-pushed the dubloom/container-back-propagation-implem branch from 4a1ab2c to d655269 Compare March 20, 2026 15:07
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.

Thanks, looks correct to me, ship it!

@gh-worker-ownership-write-b05516 gh-worker-ownership-write-b05516 Bot removed the request for review from a team March 20, 2026 15:58
@dubloom dubloom merged commit ec92fdf into master Mar 20, 2026
2078 of 2082 checks passed
@dubloom dubloom deleted the dubloom/container-back-propagation-implem branch March 20, 2026 18:22
@github-actions github-actions Bot added this to the 1.17.0 milestone Mar 20, 2026
bwoebi added a commit that referenced this pull request Mar 21, 2026
…dd-update

* 'master' of github.com:DataDog/dd-trace-php:
  [loader] Fix zombie creation (#3683)
  Adds container tags support for DBM (#3708)
  Enables process tags propagation by default (#3706)
bwoebi added a commit that referenced this pull request Mar 21, 2026
…dd-update

* 'master' of github.com:DataDog/dd-trace-php:
  [loader] Fix zombie creation (#3683)
  Adds container tags support for DBM (#3708)
  Enables process tags propagation by default (#3706)
Fix windows panic at startup time

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
bwoebi added a commit that referenced this pull request Mar 21, 2026
…dd-update

* 'master' of github.com:DataDog/dd-trace-php:
  [loader] Fix zombie creation (#3683)
  Adds container tags support for DBM (#3708)
  Enables process tags propagation by default (#3706)
Fix windows panic at startup time

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
bwoebi added a commit that referenced this pull request Mar 21, 2026
…dd-update

* 'master' of github.com:DataDog/dd-trace-php:
  [loader] Fix zombie creation (#3683)
  Adds container tags support for DBM (#3708)
  Enables process tags propagation by default (#3706)
Fix windows panic at startup time

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
clippy

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
bwoebi added a commit that referenced this pull request Mar 21, 2026
…dd-update

* 'master' of github.com:DataDog/dd-trace-php:
  [loader] Fix zombie creation (#3683)
  Adds container tags support for DBM (#3708)
  Enables process tags propagation by default (#3706)
Fix windows panic at startup time

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
clippy

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
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.

4 participants