Limit processing of large Baggage data#5672
Conversation
Typing analysisNote: Ignored files are excluded from the next sections.
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 9c8222c | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-05-05 23:10:00 Comparing candidate commit 805b8be in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 1 unstable metrics.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c3f9d79ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
The A follow-up on the same UTF-8 dimension, after going through the rest of the parser. Two pre-existing raise paths still reach the caller of
Both pre-existing, not introduced here. Flagging because this PR is already focused on UTF-8 in this method, and the new byte cap creates a small envelope where a 9KB invalid-UTF-8 header gets handled cleanly via byteslice+chop+remove_last_entry → Opened #5689 as a self-contained companion fix to make the recommendation easy to evaluate alongside this PR. It adds a The two PRs touch |
Co-authored-by: Ivo Anjo <[email protected]>
What does this PR do?
Adds item-count (64) and byte-size (8192) limits when extracting W3C baggage headers.
There's no change in behavior for baggage headers under the limit.
Change log entry
Yes. Limit extracted baggage header parsing to 64 items and 8192 bytes.
Additional Notes:
Keeps Ruby 2.5 compatibility by using bounded
splitinstead of block-formString#split.How to test the change?
bundle exec rspec spec/datadog/tracing/distributed/baggage_spec.rb