haystack-core-integrations
haystack-core-integrations copied to clipboard
Tracing integrations: allow for custom trace/run_ids
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.