Is your feature request related to a problem?
After upgrading to Langfuse v4, every LLM request results in two traces in Sentry: a bare http.server trace and a separate full waterfall trace for the Langfuse LLM generation. This duplication causes confusion and inflates the span volume in Sentry.
Describe the solution you'd like
- Provide Langfuse with a dedicated, isolated
TracerProvider to prevent LangfuseSpanProcessor from appearing on the Sentry provider.
- Add a shared, lazily-initialized isolated
TracerProvider to the Langfuse constructor at three locations.
- Ensure multi-tenant safety by allowing each project's
LangfuseSpanProcessor to filter spans by public_key.
- Keep flush unaffected by using explicit flushing via
.flush().
Result in Sentry: a single clean trace per request with no Langfuse span data leaking.
Is your feature request related to a problem?
After upgrading to Langfuse v4, every LLM request results in two traces in Sentry: a bare
http.servertrace and a separate full waterfall trace for the Langfuse LLM generation. This duplication causes confusion and inflates the span volume in Sentry.Describe the solution you'd like
TracerProviderto preventLangfuseSpanProcessorfrom appearing on the Sentry provider.TracerProviderto the Langfuse constructor at three locations.LangfuseSpanProcessorto filter spans bypublic_key..flush().Result in Sentry: a single clean trace per request with no Langfuse span data leaking.