Skip to content

docs: keep the Langfuse OTLP header on one line on Linux - #2467

Merged
eldad-caura-ai merged 1 commit into
mainfrom
docs/langfuse-otlp-header
Nov 17, 2026
Merged

eldad-caura-ai merged 1 commit into
mainfrom
docs/langfuse-otlp-header

Conversation

@eldad-caura-ai

Copy link
Copy Markdown
Member

Summary

The Langfuse block in docs/opentelemetry.md builds the OTLP auth header with $(printf … | base64). On Linux that breaks, and it leaks the keys:

  • GNU base64 wraps 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.
  • OpenTelemetry's Python OTLP exporter rejects the value. It drops the Authorization header, so spans go to Langfuse unauthenticated.
  • It also logs Header format invalid! … Authorization=Basic <base64 of pk:sk>, which writes both keys into the service's logs.

macOS base64 doesn't wrap, which is why this went unnoticed. The fix strips the newline and URL-encodes the space. caura-daemon's docs/tracing.md already uses this form.

Type of Change

  • Documentation update

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-http 1.45.2, _resolve_headers):

Block Linux (debian:stable-slim bash and GNU base64) macOS
before header dropped, warning logged with the value sent
after sent sent

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

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>
@eldad-caura-ai
eldad-caura-ai requested a review from a team as a code owner November 17, 2026 22:27
@eldad-caura-ai

Copy link
Copy Markdown
Member Author

@erni-a fsdf sdfsdfds

@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@eldad-caura-ai
eldad-caura-ai merged commit 97bac5c into main Nov 17, 2026
19 checks passed
@eldad-caura-ai
eldad-caura-ai deleted the docs/langfuse-otlp-header branch November 17, 2026 22:31
@caura-release caura-release Bot mentioned this pull request Nov 17, 2026
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.

2 participants