Repository navigation
docs: keep the Langfuse OTLP header on one line on Linux - #2467
Merged
Merged
Conversation
GNU base64 wraps its output at 76 characters, and a Langfuse key pair encodes to 116, so the documented header held a newline on Linux. OpenTelemetry's Python exporter then dropped the Authorization header, sent spans unauthenticated, and logged the header value, keys included. Strip the newline and URL-encode the space, as caura-daemon's docs/tracing.md already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: eldad-caura <eldad@caura.ai>
Member
Author
|
@erni-a fsdf sdfsdfds |
erni-a
approved these changes
Nov 17, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Langfuse block in
docs/opentelemetry.mdbuilds the OTLP auth header with$(printf … | base64). On Linux that breaks, and it leaks the keys:base64wraps its output at 76 characters, and a Langfuse key pair (pk-lf-<uuid>:sk-lf-<uuid>) encodes to 116, so the header value holds a newline.Authorizationheader, so spans go to Langfuse unauthenticated.Header format invalid! … Authorization=Basic <base64 of pk:sk>, which writes both keys into the service's logs.macOS
base64doesn't wrap, which is why this went unnoticed. The fix strips the newline and URL-encodes the space. caura-daemon'sdocs/tracing.mdalready uses this form.Type of Change
How Has This Been Tested?
I evaluated the block exactly as it appears in the doc, with fake keys of Langfuse's shape. Each value went through the exporter's own header resolution (
opentelemetry-exporter-otlp-proto-http1.45.2,_resolve_headers):debian:stable-slimbash and GNU base64)I also ran the full path end to end against a local Langfuse 4.82.0. core-api and a caura-rail turn exported over OTLP, and both turns arrived as one trace each, with core-api's memory spans nested under the Rail turn and no memory text in any observation.
No tests or code change.
🤖 Generated with Claude Code