Repository navigation
fix(util): decode OTLP header values - #55004
sdivyanshu90 wants to merge 1 commit into
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
|
Hi @kitlangton @rekram1-node, could you please review this PR whenever you have some time. Thanks! |
There was a problem hiding this comment.
Verified: the fix works. I ran the #55002 reproduction from source against a local collector. On the base, both /v1/logs and /v1/traces received Bearer%20test-token / one%2Ctwo. With this PR they receive Bearer test-token / one,two. bun test test/observability-otlp.test.ts passes (3/3), the two new tests fail on the base, and bun run typecheck in packages/util passes.
Public API: no API, config or flag changes. OTEL_EXPORTER_OTLP_HEADERS values are now percent-decoded as the OTLP spec requires. A value with a bare % that worked by accident before is now dropped, the same as OpenTelemetry's own parser does.
No blocking concerns.
Related: #22201
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #55002
Type of change
What does this PR do?
OTLP collectors currently receive
Bearer%20test-tokeninstead ofBearer test-token. Decode header values after splitting entries, preserving raw equals signs in values. Invalid percent encoding skips the affected entry without crashing exporter setup.How did you verify your code works?
From
packages/util, using Bun 1.4.2:bun test test/observability-otlp.test.ts: 3 passed, 0 failed. Loopback requests exercise both real exporters, encoded spaces/comma/equals/percent/plus, raw equals signs, and malformed encoding. Both decoding regressions fail before the fix.bun typecheck: passed.The broader util suite initially hit an intermittent failure in the unchanged network-retry test; all five retry tests passed when run alone.
Screenshots / recordings
Not applicable; no rendered UI changes.
Checklist
Added by the opencode bot (AI-generated).
Related: #22201