Skip to main content

Install

Instrument

After instrumentation every query, retriever, LLM call, and agent step is captured as a span — no per-callsite changes needed.

Minimal example

What gets captured

  • query spans for every QueryEngine.query / ChatEngine.chat
  • retriever spans with the retrieved NodeWithScore list attached as output
  • llm spans for synthesizer calls with prompt, response, and token counts
  • agent spans for ReAct and OpenAI agents, with each reasoning step as a child span
Embeddings calls used for both indexing and retrieval appear as embedding spans with input text and model metadata.