feat(dsm,dbm): add process tags support for enhanced trace correlation#7212
feat(dsm,dbm): add process tags support for enhanced trace correlation#7212
Conversation
Overall package sizeSelf size: 4.65 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7212 +/- ##
==========================================
+ Coverage 80.29% 80.31% +0.02%
==========================================
Files 732 733 +1
Lines 31468 31546 +78
==========================================
+ Hits 25267 25336 +69
- Misses 6201 6210 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-02-17 18:37:21 Comparing candidate commit 1787ebe in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 231 metrics, 29 unstable metrics. |
|
✨ Fix all issues with BitsAI or with Cursor
|
2351457 to
f1d1e85
Compare
32b4698 to
47533fd
Compare
23ac15c to
5ed29be
Compare
4c46a2e to
c089845
Compare
| const baseString = `${service}${env}` + hashableEdgeTags.join('') | ||
| const hashInput = propagationHashBigInt | ||
| ? `${baseString}:${propagationHashBigInt.toString(16)}` | ||
| : baseString |
There was a problem hiding this comment.
I feel like this is doing roughly the same job as lines 36-37 above, but in a different way, and I cannot really tell if it's same same or different...
It'd probably deserve a comment explaining how hashinput is different from key, if so, and why.
There was a problem hiding this comment.
@vandonr do these comments I added since your review make sense?
There was a problem hiding this comment.
yes, sorry I didn't circle back after I left those comments :)
I'd say it's pretty verbose now 😂 but looks good, I mostly missed the fact that one had the parent hash and not the other.
| path: `/v${version}/traces`, | ||
| method: 'PUT', | ||
| headers: { | ||
| ...headers, |
There was a problem hiding this comment.
I'm not sure where this is coming from, but if we want to read the container tags hash from the response, we need to provide the container ID as part of the request headers (under the key Datadog-Container-ID).
Maybe it was done already, but I don't see it in your changes here.
There was a problem hiding this comment.
Datadog-Container-ID is automatically injected by docker.inject() in exporters/common/request.js.
c089845 to
94c16b1
Compare
49e27e0 to
21758cc
Compare
|
|
||
| // Add ProcessTags only if feature is enabled and process tags exist | ||
| if (propagationHash.isEnabled() && processTags.serialized) { | ||
| payload.ProcessTags = processTags.serialized.split(',') |
There was a problem hiding this comment.
nit: do we need to be worried about paths having commas if we're just splitting by the comma?
(Not saying it's a big concern so this is just a nit)
There was a problem hiding this comment.
I believe the process tag sanitize function would have already replaced comma characters in filenames with underscores.
dc36239 to
6dea5f0
Compare
Add propagation hash support to Data Streams Monitoring (DSM) and Database Monitoring (DBM) to enable correlation between traces, database operations, and data stream pathways using process and container metadata. The propagation hash is an FNV-1a 64-bit hash combining process tags (entrypoint info, package.json name) with container tags received from the Datadog agent. This hash is included in DSM pathway computations and DBM SQL comments to enable enhanced observability and trace correlation. Key changes: - Create propagation-hash module for FNV-1a hash computation with caching - Update DSM pathway hash computation to include propagation hash - Add ProcessTags field to DSM payloads sent to agent - Add ddsh parameter to DBM SQL comments containing propagation hash - Capture container tags from agent response headers - Feature is opt-in via DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED This aligns with similar implementations in dd-trace-py (#15356), dd-trace-java (#9282), and dd-trace-rb (#5208, #5209). Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
6dea5f0 to
1787ebe
Compare
#7212) Add propagation hash support to Data Streams Monitoring (DSM) and Database Monitoring (DBM) to enable correlation between traces, database operations, and data stream pathways using process and container metadata. The propagation hash is an FNV-1a 64-bit hash combining process tags (entrypoint info, package.json name) with container tags received from the Datadog agent. This hash is included in DSM pathway computations and DBM SQL comments to enable enhanced observability and trace correlation. Key changes: - Create propagation-hash module for FNV-1a hash computation with caching - Update DSM pathway hash computation to include propagation hash - Add ProcessTags field to DSM payloads sent to agent - Add ddsh parameter to DBM SQL comments containing propagation hash - Capture container tags from agent response headers - Feature is opt-in via DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED This aligns with similar implementations in dd-trace-py (#15356), dd-trace-java (#9282), and dd-trace-rb (#5208, #5209). Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
…ent payload Split startupLog into three independent functions so config is logged immediately at init (via proxy.js) while integrations are logged later on first agent payload (via writer.js). This gives users config info faster without losing the integrations_loaded field that was regressed in #7470. Also fixes broken agent error logging introduced in #7212 where `startupLog({ agentError: err })` didn't match the expected `{ status, message }` shape. Co-Authored-By: Claude Opus 4.6 <[email protected]>
#7212) Add propagation hash support to Data Streams Monitoring (DSM) and Database Monitoring (DBM) to enable correlation between traces, database operations, and data stream pathways using process and container metadata. The propagation hash is an FNV-1a 64-bit hash combining process tags (entrypoint info, package.json name) with container tags received from the Datadog agent. This hash is included in DSM pathway computations and DBM SQL comments to enable enhanced observability and trace correlation. Key changes: - Create propagation-hash module for FNV-1a hash computation with caching - Update DSM pathway hash computation to include propagation hash - Add ProcessTags field to DSM payloads sent to agent - Add ddsh parameter to DBM SQL comments containing propagation hash - Capture container tags from agent response headers - Feature is opt-in via DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED This aligns with similar implementations in dd-trace-py (#15356), dd-trace-java (#9282), and dd-trace-rb (#5208, #5209). Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
#7643) * fix(startup-log): emit config early at init, integrations on first agent payload Split startupLog into three independent functions so config is logged immediately at init (via proxy.js) while integrations are logged later on first agent payload (via writer.js). This gives users config info faster without losing the integrations_loaded field that was regressed in #7470. Also fixes broken agent error logging introduced in #7212 where `startupLog({ agentError: err })` didn't match the expected `{ status, message }` shape. Co-Authored-By: Claude Opus 4.6 <[email protected]> * ci: re-run CI --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
#7643) * fix(startup-log): emit config early at init, integrations on first agent payload Split startupLog into three independent functions so config is logged immediately at init (via proxy.js) while integrations are logged later on first agent payload (via writer.js). This gives users config info faster without losing the integrations_loaded field that was regressed in #7470. Also fixes broken agent error logging introduced in #7212 where `startupLog({ agentError: err })` didn't match the expected `{ status, message }` shape. Co-Authored-By: Claude Opus 4.6 <[email protected]> * ci: re-run CI --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
#7643) * fix(startup-log): emit config early at init, integrations on first agent payload Split startupLog into three independent functions so config is logged immediately at init (via proxy.js) while integrations are logged later on first agent payload (via writer.js). This gives users config info faster without losing the integrations_loaded field that was regressed in #7470. Also fixes broken agent error logging introduced in #7212 where `startupLog({ agentError: err })` didn't match the expected `{ status, message }` shape. Co-Authored-By: Claude Opus 4.6 <[email protected]> * ci: re-run CI --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
Summary
This PR adds propagation hash support to Data Streams Monitoring (DSM) and Database Monitoring (DBM) to enable correlation between traces, database operations, and data stream pathways using process and container metadata.
The propagation hash is an FNV-1a 64-bit hash combining:
This hash is used to:
ProcessTagsfield to payloadsddsh='<hex_hash>'parameter to SQL comments for database query correlationRelated PRs