Langfuse loses trace context when OpenTelemetry middleware is enabled #9988
Unanswered
stefanshipinkoski
asked this question in
Support
Replies: 1 comment 7 replies
-
|
Hi @stefanshipinkoski, could you try to set up a separate OTel tracer for Langfuse, similar to the setup we documented here with Sentry? https://langfuse.com/docs/observability/sdk/typescript/advanced-usage#setup-with-sentry |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Langfuse team 👋,
I’m using Langfuse together with Honeycomb in a FastAPI app, both relying on OpenTelemetry OTLP exports for tracing.
Honeycomb setup: uses TracerProvider + OTLPSpanExporter and adds OpenTelemetryMiddleware via
which works fine alone.
Langfuse setup: creates its own isolated TracerProvider and initializes the client as:
and the @observe decorator to track LLM flows and functions.
Problem:
When OpenTelemetryMiddleware is enabled, all Langfuse traces lose context — the dashboard shows disconnected or incomplete traces. Disabling the middleware restores proper Langfuse behavior.
Question:
What’s the recommended way to integrate Langfuse with an existing OpenTelemetry setup (Honeycomb) that already defines a global TracerProvider and exports via OTLP?
I tried searching for similar issues, but they seem not to be related to what I experience. If I'm wrong, feel free to share it with me 🙏
Additionally, if needed, I can share screenshots showing the difference between Langfuse traces with and without the OpenTelemetry middleware enabled.
Thank you,
BR,
Stefan
Beta Was this translation helpful? Give feedback.
All reactions