fix(tracer): enforce baggage item and byte limits on extraction#4720
Conversation
Apply baggageMaxItems and baggageMaxBytes when extracting baggage from incoming headers in (*propagatorBaggage).extractTextMap. Items beyond either limit are dropped. Brings extract-side behavior in line with the existing inject-side enforcement. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: b037ef9 | Docs | Datadog PR Page | Give us feedback! |
Replace zero-start C-style loops with range-over-int form to satisfy the modernize/rangeint linter. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Split the combined limit check so we can emit a distinct warning for the items vs. bytes case when entries are dropped. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
BenchmarksBenchmark execution time: 2026-05-04 19:51:43 Comparing candidate commit b037ef9 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 271 metrics, 7 unstable metrics.
|
ffc33dc
into
main
### What does this PR do? Applies `baggageMaxItems` (64) and `baggageMaxBytes` (8192) when extracting baggage from incoming headers in `(*propagatorBaggage).extractTextMap`. Once either limit would be breached by the next entry, the remaining entries are dropped. ### Motivation Brings extract-side behavior in line with the existing inject-side enforcement of these same limits. Co-authored-by: mikayla.toffler <[email protected]>
What does this PR do?
Applies
baggageMaxItems(64) andbaggageMaxBytes(8192) when extracting baggage from incoming headers in(*propagatorBaggage).extractTextMap. Once either limit would be breached by the next entry, the remaining entries are dropped.Motivation
Brings extract-side behavior in line with the existing inject-side enforcement of these same limits.