deepset-ai / deepset-ai/haystack-core-integrations
Scope tracing per pipeline via runtime parameters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 203
- Forks
- 332
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 80
Description
Is your feature request related to a problem? Please describe.
Currently, tracing in Haystack is globally enabled or disabled for all pipelines via the tracer configuration (e.g., Langfuse). This means that if tracing is enabled, it applies to every pipeline in the interpreter, and there is no built-in way to scope tracing to a specific pipeline or to enable/disable tracing dynamically per pipeline execution. This is an issue for users who run multiple pipelines in the same process and want to trace only a subset of them.
Describe the solution you'd like
I would like the ability to enable or disable tracing on a per-pipeline or per-run basis. Ideally, this could be achieved by:
- Allowing a runtime parameter (e.g.,
tracing_enabled) to be passed to the tracing component (such as LangfuseConnector) in the pipeline. - The tracing component (and/or the DefaultSpan implementation) should inspect this parameter at runtime and decide whether to emit traces for that pipeline run execution.
- We are talking about Langfuse here but perhaps this should be standardized across all tracing frameworks
Describe alternatives you've considered
- Passing a custom flag (e.g.,
tracing_enabled) in the invocation context and customizing the tracing component to check this flag before emitting traces. However, this requires custom code and is not supported out of the box.
Additional context
For origination see this Discord exchange.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the LangfuseConnector, DefaultSpan implementation, and invocation context mentioned in the issue. Determine how tracing configuration and runtime parameters flow through a pipeline execution. Done means the design supports enabling or disabling tracing for one pipeline run without changing tracing behavior for other pipelines, while clarifying whether the approach should cover multiple tracing frameworks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100