-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Unified Tracing with LangfuseConnector
Across Main and Sub-Pipelines in Haystack
#1605
Comments
Hey @immortal3 thanks for raising! One request: Would it be possible for you to try using the OpenTelemetryTracer |
@sjrl I tried To give you more context, we are already on langsmith and for Since, We want to optimize latency, we tried switch to For If you're willing to help with |
(related to deepset-ai/haystack-experimental#217 ) |
Hey @immortal3 I've opened a PR #1624 that contains the fix to this issue. Once that's merged and released then our Langfuse integration properly collects the traces of sub-pipelines under the main one. |
@sjrl After release, Do we have to use SuperComponent to wrap our pipelines for single trace ? Or Current setup will work ? |
@immortal3 no your current set up should also work. You can see in the test I made here doesn't use super components, but just custom components that wrap a pipeline. |
Hey @immortal3 this has been merged now and is available in |
Great. Thanks for quickly jumping in and fixing it. 🙌 |
Please provide guidance or documentation on how to configure Haystack pipelines with
LangfuseConnector
to ensure a single, unified trace across both main pipelines and sub-pipelines. If this functionality is not currently supported, I would like to propose it as a feature request to enhance traceability in complex pipeline setups.Description:
When using Haystack pipelines that include sub-pipelines alongside the
LangfuseConnector
, it's currently unclear how to maintain a consistent trace context throughout the entire execution flow.At present, it appears that each pipeline (main and sub-pipelines) may generate separate traces, which makes it difficult to monitor or debug the full journey of a request from the top-level pipeline into its nested components in Langfuse.
Reproducible Example:
Here's a simplified example to demonstrate the issue. We have a main pipeline and two sub-pipelines. A
LangfuseConnector
is included in the main pipeline for tracing purposes.Expected Behavior:
We would expect a single trace in Langfuse that includes the full execution of the main pipeline along with its sub-pipelines (retrieval and generation steps). This would provide an end-to-end view of the request lifecycle in a unified format.
Additional Notes:
It seems there is a
span_handler
parameter available in theLangfuseConnector
, and we wonder if customizing it could allow propagation of trace context across sub-pipelines. If there are any recommended approaches or workarounds using this, documentation or examples would be greatly appreciated.Feature Request (if not currently supported):
If unified trace context propagation is not currently supported out of the box, please consider adding this functionality. It would significantly improve the developer experience and observability for users building modular, nested pipelines in Haystack.
The text was updated successfully, but these errors were encountered: