LlamaIndex (tracing)
LlamaIndex (tracing)
LlamaIndex (tracing)
LlamaIndex is a framework for building LLM applications with your own data. It provides indexes, query engines, retrievers, and agents for retrieval-augmented generation. Respan captures LlamaIndex spans through respan-tracing, including index construction, retrieval, LLM calls, embeddings, and agent tool use.
Create an account at platform.respan.ai and grab an API key.
Run npx @respan/cli setup to set up with your coding agent.
See LlamaIndex gateway setup to route this integration through the Respan gateway.
respan-example-projects/python/tracing/llama-indexOPENAI_API_KEY is used for the LlamaIndex OpenAI LLM. RESPAN_API_KEY exports traces to Respan.
Open the Traces page to see your workflow with index, retrieval, LLM, embedding, and tool spans.
Set defaults at initialization. These apply to all spans emitted by the LlamaIndex instrumentor.
Override per request using a context scope.
Decorators are not required for LlamaIndex instrumentation. Query engines, retrievers, agents, tools, embeddings, and LLM calls are captured by LlamaIndexInstrumentor. Use @workflow and @task when you want to group several LlamaIndex operations into one named trace tree.
Query engines are captured with nested retriever, synthesizer, and LLM spans.
Embedding calls are captured as embedding logs. Vector values are summarized instead of recording the full embedding array.
LlamaIndex ReAct agents emit agent, tool, and LLM spans in the same trace tree.