feat(agentless): add compute_stats, trace_root, and top_level tags#7716
Conversation
Overall package sizeSelf size: 4.94 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 |
… agentless encoder Enriches agentless JSON-encoded spans with metadata required by the intake to compute APM stats server-side: - _dd.compute_stats on the first span of each trace - _trace_root on root spans (parent_id == 0) - _top_level on top-level spans Co-Authored-By: Claude Opus 4.6 <[email protected]>
1c20f95 to
470470c
Compare
brettlangdon
left a comment
There was a problem hiding this comment.
packages/dd-trace/src/encode/agentless-json.js lgtm and matches what Python is doing
BenchmarksBenchmark execution time: 2026-03-09 17:11:19 Comparing candidate commit 470470c in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 229 metrics, 30 unstable metrics. scenario:appsec-iast-with-vulnerability-control-22
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7716 +/- ##
=======================================
Coverage 80.35% 80.36%
=======================================
Files 741 741
Lines 32004 32011 +7
=======================================
+ Hits 25718 25725 +7
Misses 6286 6286 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:
|
|
/remove |
|
View all feedbacks in Devflow UI.
|
f89ed61
into
master
… agentless encoder (#7716) feat(agentless): add compute_stats, trace_root, and top_level tags to agentless encoder Enriches agentless JSON-encoded spans with metadata required by the intake to compute APM stats server-side: - _dd.compute_stats on the first span of each trace - _trace_root on root spans (parent_id == 0) - _top_level on top-level spans Co-Authored-By: Claude Opus 4.6 <[email protected]> Co-authored-by: bryan.english <[email protected]>
… agentless encoder (#7716) feat(agentless): add compute_stats, trace_root, and top_level tags to agentless encoder Enriches agentless JSON-encoded spans with metadata required by the intake to compute APM stats server-side: - _dd.compute_stats on the first span of each trace - _trace_root on root spans (parent_id == 0) - _top_level on top-level spans Co-Authored-By: Claude Opus 4.6 <[email protected]> Co-authored-by: bryan.english <[email protected]>
Summary
_dd.compute_statsmeta tag on the first span of each trace_trace_rootmetric on root spans (parent_id == 0)_top_levelmetric on top-level spans (where_dd.top_levelis set)Equivalent to DataDog/dd-trace-py#16790 for the JS tracer.
Continuation of #7632.
Test plan
_dd.compute_statson first span only (single and multi-encode calls)_trace_rooton root vs child spans_top_levelon top-level vs non-top-level spans_dd.top_level(value 0) not triggering_top_level_dd.compute_stats🤖 Generated with Claude Code