Repository navigation
Conversation
Two snapshots from the same container, one from before and one from after a restart, can't be told apart from their payloads: the host and container tags are the same, and inside a container the process id in `logger.thread_id` is often the same after every restart too. Add the tracer's per-process runtime id at the root of every snapshot payload, in both agent and agentless mode. That's where the Ruby tracer emits it, and where the shared system test for snapshot correlation looks for it. The `runtime_id` tag that is already sent in agentless mode is left as is. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Overall package sizeSelf size: 9.44 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.5.1 | 127.66 kB | 531.94 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
|
✅ All CI checks and tests passed. Datadog automation helped this PR pass. 🎉 All green!🧪 All tests passed 🔄 Datadog retried 4 tests - 4 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: 344719a | Docs | View more details | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10678 +/- ##
=======================================
Coverage 98.87% 98.87%
=======================================
Files 1058 1058
Lines 171887 171895 +8
Branches 74 74
=======================================
+ Hits 169949 169957 +8
Misses 1938 1938
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-10-07 19:01:00 Comparing candidate commit 344719a in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2392 metrics, 11 unstable metrics.
|
What does this PR do?
Adds the tracer's per-process
runtime_idat the root of every snapshot payload, in both agent and agentless mode.{ "ddsource": "dd_debugger", "hostname": "...", "service": "...", + "runtime_id": "3b9c3a4e-...", "message": "...", "logger": { ... }, "dd": { "trace_id": "...", "span_id": "..." }, "debugger": { "snapshot": { ... } } }Opened as a draft: it's meant as a concrete starting point for agreeing, across tracers, on where this field lives.
Motivation
Gap 1 of the RFC: Improving Correlation for Live Debugger Snapshots: two snapshots from the same container, one from before and one from after a restart, can't be told apart from their payloads. Host and container tags are the same, and inside a container the process id in
logger.thread_idis often the same after every restart too.The tracers don't agree on where, or whether, they send it today:
ddtagstagruntime-id)debugger.snapshot.runtime_idruntime-id)runtime_id, only when env and version are set)runtime_id)The Agent's debugger proxy doesn't add a runtime id either.
Additional Notes
test_runtime_id_in_envelopesystem test looks (rootruntime_idordd.runtime_id). The test only reads the payload, never theddtagsquery string. Python's open PR uses a location the test doesn't read.runtime_idtag. This PR leaves it as is. The duplication is harmless, and no explanation was recorded for why the tag is agentless-only.test_runtime_id_in_envelopecan be flipped once this ships.Validation:
./node_modules/.bin/mocha packages/dd-trace/test/debugger/devtools_client/send.spec.js: 27 passing. The expected payloads includeruntime_idin agent mode, and the agentless test asserts it too../node_modules/.bin/mocha --timeout 60000 integration-tests/debugger/input-messages.spec.js integration-tests/debugger/probe-file.spec.js integration-tests/debugger/tracing-integration.spec.js: 11 passing. The shared basic-input assertion now checks thatruntime_idis a UUID equal to theruntime-idtag of the request span.npm run test:debugger: 821 passing.tsc -p tsconfig.debugger.jsonreports no new errors.🤖 Generated with Claude Code