deepset-ai / deepset-ai/haystack-core-integrations
Tracing integrations: allow for custom trace/run_ids
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.
When working on LLM applications and tracing them, the trace_id is usually key to later on:
- add additional non-haystack spans to the trace
- record user feedback or other evaluation metrics for the trace
- be able to fetch the single trace via API at a later point
- use distributed tracing to log to the same trace id
Currently, there is no way of customizing the trace_id (at least not when using the Langfuse intgeration).
Describe the solution you'd like
I like the DX of LangChain where a run_id can be set via the run_config and is later on used as a trace_id for tracing. See example here.
I am unsure where this is best set within Haystack, probably as part of the run method.
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 reading the Langfuse integration and the run method, focusing on where trace IDs are currently created and passed. The work is done when callers can provide a custom run_id or trace_id and the integration uses it for the resulting trace, including later API lookup and distributed tracing.
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
- Needs clarification
- Newbie friendliness
- 25/100