LlamaIndex
cetra can trace LlamaIndex queries, retrievals and model calls from Python through the OpenInference LlamaIndex instrumentation.
Install
Section titled “Install”pip install "cetra-sdk[llama-index]" llama-indexSet up
Section titled “Set up”import cetra
cetra.init(instrument=["llama-index"])
# Build and query your index as usual. LlamaIndex calls are traced from here on.What you get
Section titled “What you get”cetra reads the spans of the OpenInference LlamaIndex instrumentation with the OpenInference convention. cetra supports the OpenInference retriever, reranker and embedding span kinds. See Semantic conventions.
Limits
Section titled “Limits”- No captured spans of this instrumentation are in the repository. The only check is an SDK test that imports the instrumentor when the extra is installed. This page does not say which LlamaIndex operations are traced.
- If a field is missing, look at the span’s Attributes tab and compare it with Span attributes.
- Traces: read the trace as a tree and a timeline.
- Cost and tokens: how cost is computed from the token counts.
- Online rules: score these traces automatically.