LlamaIndex
Trace LlamaIndex pipelines with Rius: query engines, retrievers, embeddings, and the model calls inside them.
This integration is Python only. There is no LlamaIndex integration in TypeScript, so query-engine and retriever structure is not captured for LlamaIndex.TS. The OpenAI integration still traces the provider calls it makes through the OpenAI client, and manual generations cover the pipeline around them.
Setup
pip install "glassflow-rius[llama-index]" llama-indexThe extra installs the instrumentation, not llama-index itself, so the
package is named here for a fresh environment. A project that already
calls LlamaIndex has it, and pip leaves it untouched. Without it, init()
logs a DependencyConflict and this integration stays off.
import rius
rius.init(api_key="gf_...", service_name="my-agent")
# build indexes and query engines exactly as beforeWhat gets captured
A query becomes a nested trace of typed spans: retrieval steps as RETRIEVER spans, embedding calls as EMBEDDING, synthesis model calls as LLM spans with model, token usage, and messages (cost computed server-side). RAG debugging usually starts here: the retriever span’s output shows what the model was given to work with.
Verify
Run one query against an index, then open the trace in the console: the pipeline appears as nested spans with the LLM leaf carrying model, tokens, and cost.
Retrieved document content and messages are content attributes; privacy controls cover them, while document ids and scores stay visible even with content stripped.