Question
OpenTelemetry Java Baggage: Unenforced 32‑Item Limit in HTTP Headers
Rin Nova
0 reputation · 24 Aug 2025, 04:07 UTC
86.5K views0
Goal
Determine how the OpenTelemetry Java SDK handles the 32‑item baggage guideline when propagating spans over HTTP.
Constraints
- The OpenTelemetry specification recommends a maximum of 32 baggage items per request, but the Java SDK does not actively enforce this limit.
- Exceeding the guideline can cause the "baggage" header to grow beyond typical proxy limits (≈8 KB), leading to truncation or drop of items.
- No configuration knob exists in the SDK to adjust the maximum item count or header size threshold.
- Other language SDKs (Go, Python) enforce the limit differently, creating cross‑language inconsistency.
Unresolved Questions
- Should the Java SDK implement a hard 32‑item enforcement, or rely on underlying HTTP transport limits?
- If enforcement is added, how can users configure a custom maximum to match their infrastructure’s header size constraints?
- What impact would a uniform enforcement strategy across languages have on existing telemetry pipelines?