Skip to content

feat(process tags): add tags to runtime metrics#7717

Merged
tlhunter merged 14 commits intomasterfrom
tlhunter/process-tags-completion
Mar 12, 2026
Merged

feat(process tags): add tags to runtime metrics#7717
tlhunter merged 14 commits intomasterfrom
tlhunter/process-tags-completion

Conversation

@tlhunter
Copy link
Copy Markdown
Member

@tlhunter tlhunter commented Mar 9, 2026

What does this PR do?

  • adds process tags to runtime metrics
  • adds process tags to process discovery
  • enables process tags by default

Motivation

  • process tags are key/value pairs about the current application useful for renaming processes
  • includes things like cwd, script name, etc.

Additional Notes

  • search the commit history for "process tags" to see previous commits

@tlhunter tlhunter added semver-minor AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos labels Mar 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

Overall package size

Self size: 4.96 MB
Deduped: 5.81 MB
No deduping: 5.81 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

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

@datadog-prod-us1-3

This comment has been minimized.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 9, 2026

Benchmarks

Benchmark execution time: 2026-03-12 21:25:42

Comparing candidate commit 5921780 in PR branch tlhunter/process-tags-completion with baseline commit f31802d in branch master.

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

@tlhunter tlhunter force-pushed the tlhunter/process-tags-completion branch from e14b440 to 53e65d9 Compare March 9, 2026 17:26
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.43%. Comparing base (f31802d) to head (5921780).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7717   +/-   ##
=======================================
  Coverage   80.42%   80.43%           
=======================================
  Files         741      741           
  Lines       32168    32172    +4     
=======================================
+ Hits        25872    25876    +4     
  Misses       6296     6296           
Flag Coverage Δ
aiguard-macos 38.83% <ø> (-0.10%) ⬇️
aiguard-ubuntu 38.95% <ø> (-0.10%) ⬇️
aiguard-windows 38.68% <ø> (-0.10%) ⬇️
apm-capabilities-tracing-macos 48.89% <100.00%> (+<0.01%) ⬆️
apm-capabilities-tracing-ubuntu 48.94% <100.00%> (+<0.01%) ⬆️
apm-capabilities-tracing-windows 48.67% <100.00%> (+0.01%) ⬆️
apm-integrations-child-process 38.39% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-18 37.31% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-eol 37.78% <ø> (-0.13%) ⬇️
apm-integrations-oracledb 37.62% <ø> (-0.10%) ⬇️
appsec-express 55.20% <ø> (-0.07%) ⬇️
appsec-fastify 51.54% <ø> (-0.07%) ⬇️
appsec-graphql 51.73% <ø> (-0.08%) ⬇️
appsec-kafka 44.27% <ø> (-0.08%) ⬇️
appsec-ldapjs 43.93% <ø> (-0.08%) ⬇️
appsec-lodash 43.59% <ø> (-0.08%) ⬇️
appsec-macos 58.21% <ø> (-0.07%) ⬇️
appsec-mongodb-core 48.70% <ø> (-0.09%) ⬇️
appsec-mongoose 49.37% <ø> (-0.08%) ⬇️
appsec-mysql 50.80% <ø> (-0.17%) ⬇️
appsec-node-serialize 43.11% <ø> (-0.08%) ⬇️
appsec-passport 47.55% <ø> (-0.09%) ⬇️
appsec-postgres 50.52% <ø> (-0.09%) ⬇️
appsec-sourcing 42.51% <ø> (-0.08%) ⬇️
appsec-template 43.27% <ø> (-0.08%) ⬇️
appsec-ubuntu 58.29% <ø> (-0.07%) ⬇️
appsec-windows 58.07% <ø> (-0.07%) ⬇️
instrumentations-instrumentation-bluebird 32.26% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-body-parser 40.41% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-child_process 37.71% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 34.24% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express 34.56% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.37% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-session 40.05% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-fs 31.88% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-generic-pool 29.69% <ø> (ø)
instrumentations-instrumentation-http 39.69% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-knex 32.27% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-mongoose 33.39% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-multer 40.16% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-mysql2 38.17% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-passport 43.97% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport-http 43.64% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport-local 44.17% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-pg 37.60% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise 32.19% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise-js 32.20% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-q 32.24% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-url 32.17% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-when 32.21% <ø> (-0.10%) ⬇️
llmobs-ai 42.15% <ø> (-0.09%) ⬇️
llmobs-anthropic 40.14% <ø> (-0.09%) ⬇️
llmobs-bedrock 39.13% <ø> (-0.08%) ⬇️
llmobs-google-genai 39.69% <ø> (-0.09%) ⬇️
llmobs-langchain 39.93% <ø> (-0.19%) ⬇️
llmobs-openai 43.87% <ø> (-0.09%) ⬇️
llmobs-vertex-ai 39.94% <ø> (-0.09%) ⬇️
platform-core 31.53% <ø> (ø)
platform-esbuild 34.48% <ø> (ø)
platform-instrumentations-misc 48.40% <ø> (ø)
platform-shimmer 37.63% <ø> (ø)
platform-unit-guardrails 32.95% <ø> (ø)
plugins-azure-event-hubs 25.83% <ø> (ø)
plugins-azure-service-bus 25.19% <ø> (ø)
plugins-bullmq 44.07% <ø> (-0.08%) ⬇️
plugins-cassandra 37.66% <ø> (-0.10%) ⬇️
plugins-cookie 26.89% <ø> (ø)
plugins-cookie-parser 26.67% <ø> (ø)
plugins-crypto 26.79% <ø> (ø)
plugins-dd-trace-api 38.22% <ø> (-0.10%) ⬇️
plugins-express-mongo-sanitize 26.82% <ø> (ø)
plugins-express-session 26.63% <ø> (ø)
plugins-fastify 42.13% <ø> (-0.09%) ⬇️
plugins-fetch 38.22% <ø> (-0.09%) ⬇️
plugins-fs 38.49% <ø> (-0.10%) ⬇️
plugins-generic-pool 25.87% <ø> (ø)
plugins-google-cloud-pubsub 45.34% <ø> (-0.07%) ⬇️
plugins-grpc 40.81% <ø> (-0.09%) ⬇️
plugins-handlebars 26.86% <ø> (ø)
plugins-hapi 40.04% <ø> (-0.10%) ⬇️
plugins-hono 40.30% <ø> (-0.10%) ⬇️
plugins-ioredis 38.30% <ø> (-0.10%) ⬇️
plugins-knex 26.50% <ø> (ø)
plugins-ldapjs 24.36% <ø> (ø)
plugins-light-my-request 26.23% <ø> (ø)
plugins-limitd-client 32.54% <ø> (-0.10%) ⬇️
plugins-lodash 25.96% <ø> (ø)
plugins-mariadb 39.35% <ø> (-0.15%) ⬇️
plugins-memcached 38.03% <ø> (-0.10%) ⬇️
plugins-microgateway-core 39.11% <ø> (-0.10%) ⬇️
plugins-moleculer 40.40% <ø> (-0.09%) ⬇️
plugins-mongodb 39.05% <ø> (-0.10%) ⬇️
plugins-mongodb-core 38.88% <ø> (-0.10%) ⬇️
plugins-mongoose 38.74% <ø> (-0.10%) ⬇️
plugins-multer 26.63% <ø> (ø)
plugins-mysql 39.04% <ø> (-0.10%) ⬇️
plugins-mysql2 39.14% <ø> (-0.10%) ⬇️
plugins-node-serialize 26.93% <ø> (ø)
plugins-opensearch 37.49% <ø> (-0.10%) ⬇️
plugins-passport-http 26.68% <ø> (ø)
plugins-postgres 35.53% <ø> (-0.09%) ⬇️
plugins-process 26.79% <ø> (ø)
plugins-pug 26.89% <ø> (ø)
plugins-redis 38.77% <ø> (-0.10%) ⬇️
plugins-router 42.85% <ø> (-0.10%) ⬇️
plugins-sequelize 25.47% <ø> (ø)
plugins-test-and-upstream-amqp10 38.38% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-amqplib 43.76% <ø> (-0.08%) ⬇️
plugins-test-and-upstream-apollo 39.01% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-avsc 38.55% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-bunyan 33.80% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-connect 40.70% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-graphql 40.00% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-koa 40.29% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-protobufjs 38.78% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-rhea 43.94% <ø> (-0.07%) ⬇️
plugins-undici 38.99% <ø> (-0.09%) ⬇️
plugins-url 26.79% <ø> (ø)
plugins-valkey 37.97% <ø> (-0.10%) ⬇️
plugins-vm 26.79% <ø> (ø)
plugins-winston 33.99% <ø> (-0.10%) ⬇️
plugins-ws 41.76% <ø> (-0.10%) ⬇️
profiling-macos 39.80% <ø> (-0.10%) ⬇️
profiling-ubuntu 39.92% <ø> (-0.10%) ⬇️
profiling-windows 41.51% <ø> (+0.30%) ⬆️
serverless-azure-functions-client 25.54% <ø> (ø)
serverless-azure-functions-eventhubs 25.54% <ø> (ø)
serverless-azure-functions-servicebus 25.54% <ø> (ø)

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.

@tlhunter
Copy link
Copy Markdown
Member Author

tlhunter commented Mar 9, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7afe8d0f86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tlhunter tlhunter marked this pull request as ready for review March 9, 2026 21:31
@tlhunter tlhunter requested review from a team as code owners March 9, 2026 21:31
@tlhunter tlhunter requested review from khanayan123 and removed request for a team March 9, 2026 21:31
@tlhunter tlhunter force-pushed the tlhunter/process-tags-completion branch from fb5b986 to e4ffb9f Compare March 12, 2026 16:52
CarlesDD
CarlesDD previously approved these changes Mar 12, 2026
Copy link
Copy Markdown
Contributor

@CarlesDD CarlesDD left a comment

Choose a reason for hiding this comment

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

LGTM from a language perspective

@tlhunter
Copy link
Copy Markdown
Member Author

tlhunter and others added 8 commits March 12, 2026 14:09
With process tags enabled by default, the propagation hash is now
included in DSM pathway hash computation. Fix the spec to read the
actual service/env from the DataStreamsProcessor and use the real
propagationHash.getHash() so expected hashes match at runtime.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… hash

With process tags enabled by default, the propagation hash is now
included in DSM pathway hash computation. Update rhea and sns DSM tests
to dynamically compute expected hashes using propagationHash.getHash().

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The outer before() for agent.load('rhea') does not return its Promise,
so tracer.init() (which configures propagationHash) fires asynchronously.
Switching to beforeEach ensures propagationHash is configured before
computing expected hashes.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
tlhunter and others added 5 commits March 12, 2026 14:09
generateClientConfig() is shared between runtime metrics and the user-facing
CustomMetrics (tracer.dogstatsd), so injecting process tags there would
silently change cardinality for all user-emitted custom metrics. Move the
injection into runtime_metrics.js where it only affects runtime metrics.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@tlhunter tlhunter force-pushed the tlhunter/process-tags-completion branch from e4ffb9f to b7f4385 Compare March 12, 2026 21:09
@tlhunter tlhunter changed the title feat(process tags): enable by default, runtime metrics, process discovery feat(process tags): add tags to runtime metrics Mar 12, 2026
Copy link
Copy Markdown
Contributor

@wantsui wantsui left a comment

Choose a reason for hiding this comment

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

LGTM in terms of functionality.

@gh-worker-ownership-write-b05516 gh-worker-ownership-write-b05516 bot removed the request for review from a team March 12, 2026 22:47
@tlhunter tlhunter merged commit ae39159 into master Mar 12, 2026
789 checks passed
@tlhunter tlhunter deleted the tlhunter/process-tags-completion branch March 12, 2026 22:55
@dd-octo-sts dd-octo-sts bot mentioned this pull request Mar 13, 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 semver-minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants