Skip to content

Apply baggage limits#8380

Merged
jack-berg merged 5 commits intoopen-telemetry:mainfrom
jack-berg:apply-baggage-limits
May 8, 2026
Merged

Apply baggage limits#8380
jack-berg merged 5 commits intoopen-telemetry:mainfrom
jack-berg:apply-baggage-limits

Conversation

@jack-berg
Copy link
Copy Markdown
Member

Apply w3c baggage spec limits when extracting and injecting baggage: https://www.w3.org/TR/baggage/#limits

  • Max number of entries: 64
  • Max total length of all entries: 8192

Also apply same limits to baggage from JaegerPropagator, OtTracePropagator.

@jack-berg jack-berg requested a review from a team as a code owner May 7, 2026 20:24
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.83%. Comparing base (2fe0a14) to head (cbadf0e).
⚠️ Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
.../extension/trace/propagation/JaegerPropagator.java 83.33% 3 Missing and 3 partials ⚠️
.../opentelemetry/api/baggage/propagation/Parser.java 75.00% 1 Missing and 1 partial ⚠️
.../api/baggage/propagation/W3CBaggagePropagator.java 92.59% 0 Missing and 2 partials ⚠️
...extension/trace/propagation/OtTracePropagator.java 89.47% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8380      +/-   ##
============================================
+ Coverage     90.30%   90.83%   +0.52%     
- Complexity     7723     7982     +259     
============================================
  Files           850      898      +48     
  Lines         23256    24115     +859     
  Branches       2363     2412      +49     
============================================
+ Hits          21002    21904     +902     
+ Misses         1528     1462      -66     
- Partials        726      749      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix LGTM - had two comments - one of possible better protection (i.e. not wasting CPUs parsing degenerate baggage headers that fit within byte limit), the other for more flexible protection.

Copy link
Copy Markdown
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(elevating @jsuereth's approval)

@jack-berg jack-berg merged commit 03837d3 into open-telemetry:main May 8, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants