Commit cb3ce6d
fix(traces): restore _dd.compute_stats on span meta to fix missing trace.aws.lambda.hits
PR #1118 moved `_dd.compute_stats` from each span's `meta` (applied via
`get_tags_map()` / `ChunkProcessor`) to the payload-level `tracer_payload.tags`
only. The Datadog APM backend reads this signal from the root span's `meta`
field, not from the payload-level tags, so it stopped computing stats and
`trace.aws.lambda.hits` disappeared from the trace explorer.
Fix: propagate `_dd.compute_stats` to every span's `meta` in the same loop
that writes it to `tracer_payload.tags`, restoring the pre-#1118 behavior
while keeping the payload-level tag as well.
Also add debug logging to `handle_traces` to surface the header tags on
every incoming trace request, which aids diagnosing similar issues.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 29e1215 commit cb3ce6d
2 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
504 | 505 | | |
505 | 506 | | |
506 | 507 | | |
| 508 | + | |
| 509 | + | |
507 | 510 | | |
508 | 511 | | |
509 | 512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
366 | 377 | | |
367 | 378 | | |
368 | 379 | | |
| |||
1513 | 1524 | | |
1514 | 1525 | | |
1515 | 1526 | | |
1516 | | - | |
| 1527 | + | |
1517 | 1528 | | |
1518 | 1529 | | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
1519 | 1542 | | |
1520 | 1543 | | |
1521 | 1544 | | |
| |||
0 commit comments