Skip to content

add container id to dogstatsd metrics#7435

Merged
BridgeAR merged 3 commits intomasterfrom
dogstatsd-container-id
Feb 5, 2026
Merged

add container id to dogstatsd metrics#7435
BridgeAR merged 3 commits intomasterfrom
dogstatsd-container-id

Conversation

@rochdev
Copy link
Copy Markdown
Member

@rochdev rochdev commented Feb 4, 2026

Please make sure your changes are properly tested!

What does this PR do?

Add container ID to DogStatsD metrics.

Motivation

The agent doesn't support the Datadog-Entity-ID for proxy requests, and for UDP there are no headers to begin with, so we have to add it to every metric.

Additional Notes

DogStatsD is backward and forward compatible, so older agents will just ignore the new field.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2026

Overall package size

Self size: 4.56 MB
Deduped: 5.4 MB
No deduping: 5.4 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.6 | 81.92 kB | 813.08 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-datadog-prod-us1

This comment has been minimized.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Feb 4, 2026

Benchmarks

Benchmark execution time: 2026-02-04 22:39:14

Comparing candidate commit ba076e2 in PR branch dogstatsd-container-id with baseline commit da07fea in branch master.

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

@rochdev rochdev marked this pull request as ready for review February 4, 2026 22:38
@rochdev rochdev requested a review from a team as a code owner February 4, 2026 22:38
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.42%. Comparing base (da07fea) to head (ba076e2).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7435      +/-   ##
==========================================
+ Coverage   80.40%   80.42%   +0.01%     
==========================================
  Files         732      732              
  Lines       31050    31054       +4     
==========================================
+ Hits        24966    24975       +9     
+ Misses       6084     6079       -5     
Flag Coverage Δ
aiguard-macos 39.07% <25.00%> (-0.10%) ⬇️
aiguard-ubuntu 39.11% <41.66%> (-0.10%) ⬇️
aiguard-windows 38.96% <25.00%> (-0.10%) ⬇️
apm-capabilities-tracing-macos 48.85% <100.00%> (-0.04%) ⬇️
apm-capabilities-tracing-ubuntu 48.90% <100.00%> (+<0.01%) ⬆️
apm-capabilities-tracing-windows 48.62% <100.00%> (+0.01%) ⬆️
apm-integrations-child-process 38.57% <41.66%> (-0.10%) ⬇️
apm-integrations-couchbase-18 37.47% <41.66%> (+0.05%) ⬆️
apm-integrations-couchbase-eol 37.96% <41.66%> (+0.05%) ⬆️
apm-integrations-oracledb 37.99% <41.66%> (-0.10%) ⬇️
appsec-express 55.36% <41.66%> (-0.08%) ⬇️
appsec-fastify 51.99% <41.66%> (-0.08%) ⬇️
appsec-graphql 52.31% <41.66%> (-0.07%) ⬇️
appsec-kafka 44.63% <41.66%> (-0.08%) ⬇️
appsec-ldapjs 44.30% <41.66%> (-0.08%) ⬇️
appsec-lodash 43.99% <41.66%> (-0.08%) ⬇️
appsec-macos 58.48% <25.00%> (-0.07%) ⬇️
appsec-mongodb-core 49.19% <41.66%> (-0.08%) ⬇️
appsec-mongoose 49.88% <41.66%> (-0.07%) ⬇️
appsec-mysql 51.26% <41.66%> (-0.08%) ⬇️
appsec-node-serialize 43.50% <41.66%> (-0.08%) ⬇️
appsec-passport 48.10% <41.66%> (-0.09%) ⬇️
appsec-postgres 51.05% <41.66%> (-0.06%) ⬇️
appsec-sourcing 42.84% <41.66%> (-0.08%) ⬇️
appsec-template 43.67% <41.66%> (-0.08%) ⬇️
appsec-ubuntu 58.50% <41.66%> (-0.07%) ⬇️
appsec-windows 58.34% <25.00%> (-0.09%) ⬇️
instrumentations-instrumentation-bluebird 32.24% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-body-parser 40.73% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-child_process 37.88% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 34.50% <41.66%> (-0.09%) ⬇️
instrumentations-instrumentation-express 34.85% <41.66%> (-0.09%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.64% <41.66%> (-0.09%) ⬇️
instrumentations-instrumentation-express-session 40.41% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-fs 31.84% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-generic-pool 29.81% <33.33%> (+0.01%) ⬆️
instrumentations-instrumentation-http 39.62% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-knex 32.24% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-mongoose 33.61% <41.66%> (-0.09%) ⬇️
instrumentations-instrumentation-multer 40.46% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-mysql2 38.26% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-passport 40.77% <41.66%> (-0.09%) ⬇️
instrumentations-instrumentation-passport-http 40.74% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-passport-local 40.74% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-pg 37.78% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-promise 32.17% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-promise-js 32.18% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-q 32.22% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-url 32.14% <41.66%> (-0.10%) ⬇️
instrumentations-instrumentation-when 32.19% <41.66%> (-0.10%) ⬇️
llmobs-ai 41.41% <41.66%> (-0.09%) ⬇️
llmobs-anthropic 40.62% <41.66%> (-0.09%) ⬇️
llmobs-bedrock 39.51% <41.66%> (-0.08%) ⬇️
llmobs-google-genai 40.11% <41.66%> (-0.09%) ⬇️
llmobs-langchain 39.65% <41.66%> (-0.08%) ⬇️
llmobs-openai 44.48% <83.33%> (-0.06%) ⬇️
llmobs-vertex-ai 40.33% <41.66%> (-0.09%) ⬇️
platform-core 28.09% <ø> (?)
platform-esbuild 31.49% <ø> (ø)
platform-instrumentations-misc 39.62% <ø> (ø)
platform-shimmer 34.83% <ø> (ø)
platform-unit-guardrails 30.37% <ø> (ø)
plugins-azure-event-hubs 22.64% <ø> (ø)
plugins-azure-service-bus 22.08% <ø> (ø)
plugins-bullmq 43.58% <41.66%> (-0.08%) ⬇️
plugins-cassandra 38.03% <41.66%> (-0.10%) ⬇️
plugins-cookie 23.69% <ø> (ø)
plugins-cookie-parser 23.50% <ø> (ø)
plugins-crypto 22.88% <ø> (ø)
plugins-dd-trace-api 38.41% <83.33%> (-0.07%) ⬇️
plugins-express-mongo-sanitize 23.67% <ø> (ø)
plugins-express-session 23.46% <ø> (ø)
plugins-fastify 42.53% <41.66%> (-0.09%) ⬇️
plugins-fetch 38.60% <41.66%> (-0.09%) ⬇️
plugins-fs 38.67% <41.66%> (-0.10%) ⬇️
plugins-generic-pool 22.68% <ø> (ø)
plugins-google-cloud-pubsub 45.73% <41.66%> (-0.09%) ⬇️
plugins-grpc 41.29% <41.66%> (-0.09%) ⬇️
plugins-handlebars 23.71% <ø> (ø)
plugins-hapi 40.43% <41.66%> (-0.10%) ⬇️
plugins-hono 40.62% <41.66%> (-0.10%) ⬇️
plugins-ioredis 38.47% <41.66%> (-0.10%) ⬇️
plugins-knex 23.51% <ø> (ø)
plugins-ldapjs 21.28% <ø> (ø)
plugins-light-my-request 23.15% <ø> (ø)
plugins-limitd-client 32.54% <41.66%> (-0.10%) ⬇️
plugins-lodash 22.74% <ø> (ø)
plugins-mariadb 39.60% <41.66%> (-0.03%) ⬇️
plugins-memcached 38.20% <41.66%> (-0.10%) ⬇️
plugins-microgateway-core 39.44% <41.66%> (-0.10%) ⬇️
plugins-moleculer 40.84% <41.66%> (-0.10%) ⬇️
plugins-mongodb 39.55% <41.66%> (-0.10%) ⬇️
plugins-mongodb-core 39.12% <41.66%> (-0.10%) ⬇️
plugins-mongoose 39.18% <41.66%> (-0.10%) ⬇️
plugins-multer 23.46% <ø> (ø)
plugins-mysql 39.22% <41.66%> (-0.13%) ⬇️
plugins-mysql2 39.30% <41.66%> (-0.10%) ⬇️
plugins-node-serialize 23.73% <ø> (ø)
plugins-opensearch 37.87% <41.66%> (-0.10%) ⬇️
plugins-passport-http 23.56% <ø> (ø)
plugins-postgres 35.71% <41.66%> (-0.08%) ⬇️
plugins-process 22.88% <ø> (ø)
plugins-pug 23.69% <ø> (ø)
plugins-redis 38.79% <41.66%> (-0.10%) ⬇️
plugins-router 43.24% <41.66%> (-0.10%) ⬇️
plugins-sequelize 22.27% <ø> (ø)
plugins-test-and-upstream-amqp10 38.39% <41.66%> (-0.10%) ⬇️
plugins-test-and-upstream-amqplib 43.90% <41.66%> (-0.09%) ⬇️
plugins-test-and-upstream-apollo 39.32% <41.66%> (-0.09%) ⬇️
plugins-test-and-upstream-avsc 38.81% <41.66%> (-0.10%) ⬇️
plugins-test-and-upstream-bunyan 33.85% <41.66%> (-0.10%) ⬇️
plugins-test-and-upstream-connect 41.04% <41.66%> (-0.10%) ⬇️
plugins-test-and-upstream-graphql 40.22% <41.66%> (-0.10%) ⬇️
plugins-test-and-upstream-koa 40.68% <41.66%> (-0.10%) ⬇️
plugins-test-and-upstream-protobufjs 39.04% <41.66%> (-0.10%) ⬇️
plugins-test-and-upstream-rhea 44.15% <41.66%> (-0.10%) ⬇️
plugins-undici 39.39% <41.66%> (-0.09%) ⬇️
plugins-url 22.88% <ø> (ø)
plugins-valkey 38.12% <41.66%> (-0.10%) ⬇️
plugins-vm 22.88% <ø> (ø)
plugins-winston 34.26% <41.66%> (-0.10%) ⬇️
plugins-ws 40.75% <41.66%> (-0.10%) ⬇️
profiling-macos 40.06% <25.00%> (-0.10%) ⬇️
profiling-ubuntu 40.11% <41.66%> (-0.10%) ⬇️
profiling-windows 41.46% <25.00%> (-0.10%) ⬇️
serverless-azure-functions-client 22.38% <ø> (-0.51%) ⬇️
serverless-azure-functions-eventhubs 22.38% <ø> (-0.51%) ⬇️
serverless-azure-functions-servicebus 22.38% <ø> (-0.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@BridgeAR BridgeAR merged commit 61ead84 into master Feb 5, 2026
791 checks passed
@BridgeAR BridgeAR deleted the dogstatsd-container-id branch February 5, 2026 11:32
dd-octo-sts bot pushed a commit that referenced this pull request Feb 5, 2026
* add container id to dogstatsd metrics

* add docker helper tests

* prevent real container id from being used in test
@dd-octo-sts dd-octo-sts bot mentioned this pull request Feb 5, 2026
BridgeAR pushed a commit that referenced this pull request Feb 5, 2026
* add container id to dogstatsd metrics

* add docker helper tests

* prevent real container id from being used in test
bm1549 pushed a commit that referenced this pull request Feb 10, 2026
* add container id to dogstatsd metrics

* add docker helper tests

* prevent real container id from being used in test
BridgeAR pushed a commit that referenced this pull request Feb 22, 2026
* add container id to dogstatsd metrics

* add docker helper tests

* prevent real container id from being used in test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants