Documentation Index
Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt
Use this file to discover all available pages before exploring further.
Install
Instrument
instrument_haystack wraps a single Pipeline instance. Call it after the pipeline is built, before run().
What gets captured
- A
pipelineroot span around everyPipeline.run()call, withdataas input and the final result dict as output. - One child span per component in the pipeline (retrievers, generators, rankers, converters) with that component’s input and output attached.
- Generator components’ LLM calls appear as
llmspans with token counts and model metadata.
Known gotchas
- Haystack v2 only. The legacy Haystack v1 API (
BaseComponent) is not supported. - Component names matter. Span names come from the
namepassed topipe.add_component(...)— use descriptive names (retriever,reranker) to make the waterfall readable. run_asyncworks. The async pipeline path is instrumented via the same function — one call covers both.