openinference-instrumentation-llama-index
OpenInference LlamaIndex Instrumentation
What it is and what it does
This package wraps LlamaIndex to automatically capture execution traces—function calls, embeddings, LLM queries, and retrieval steps—and exports them as OpenTelemetry spans. It integrates with the OpenInference semantic conventions to standardize trace structure, making traces compatible with observability platforms like Arize Phoenix and Arize AX. The instrumentation is transparent: you initialize it once with a tracer provider, then your existing LlamaIndex code generates traces without modification.
The package depends on OpenTelemetry's core APIs and instrumentation framework, plus OpenInference's semantic conventions and base instrumentation library. It's designed for developers who want visibility into LlamaIndex application behavior—debugging retrieval quality, monitoring LLM call patterns, or tracking end-to-end latency. Traces stay local by default (e.g., sent to a local Phoenix instance) unless you configure a remote collector.
Use it for:
- Debug LlamaIndex retrieval and ranking to understand why queries return unexpected results.
- Monitor LLM token usage and latency across retrieval-augmented generation pipelines.
- Trace multi-step LlamaIndex workflows to identify performance bottlenecks.
- Audit LlamaIndex application behavior for compliance or quality assurance.
- Integrate LlamaIndex observability into a centralized OpenTelemetry collection pipeline.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Auto-instruments LlamaIndex applications to generate OpenTelemetry-compatible traces for observability and debugging, sending them to collectors like Arize Phoenix or Arize AX.
Yes, if you use LlamaIndex and need observability. The package is actively maintained, has no known vulnerabilities, and integrates seamlessly with the OpenTelemetry ecosystem. Install it if you're building production LlamaIndex applications or debugging retrieval quality; skip it if you don't need tracing.
Install
openinference-instrumentation-llama-index on PyPI
pip
pip install openinference-instrumentation-llama-indexuv
uv add openinference-instrumentation-llama-indexpoetry
poetry add openinference-instrumentation-llama-indexInstalling openinference-instrumentation-llama-index
Before you install
Low friction: pure Python wheel with 7 runtime dependencies already in the OpenTelemetry ecosystem. Active maintenance—released 7 days ago with 1147 GitHub stars and no known vulnerabilities.
License in practice
Apache-2.0 permissive license; safe for commercial and proprietary use with standard attribution requirements.
Quickstart
pip install openinference-instrumentation-llama-index
from openinference.instrumentation.llama_index import LlamaIndexInstrumentor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
tracer_provider = trace_sdk.TracerProvider()
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter("http://127.0.0.1:6006/v1/traces")))
LlamaIndexInstrumentor().instrument(tracer_provider=tracer_provider)
Requires Python 3.10 or later; llama-index version compatibility varies (see documentation for version mapping).
Verify before relying
- Whether the package works with all llama-index versions >=0.12.3 or only specific minor releases within that range.
- Performance overhead of instrumentation on large-scale LlamaIndex applications.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — openinference-instrumentation, openinference-semantic-conventions, opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, typing-extensions, wrapt |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 368,879/month — #7,187 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openinference_instrumentation_llama_index-4.4.5-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
openinference-instrumentation-agnoAuto-instruments Agno Agent applications to…
permissive · top 15,000 on PyPI
openinference-instrumentation-anthropicAutomatically captures and exports traces from…
permissive · top 15,000 on PyPI
openinference-instrumentation-litellmAuto-instruments LiteLLM function calls…
permissive · top 15,000 on PyPI
openinference-instrumentation-haystackAuto-instruments Haystack LLM pipelines and…
permissive · top 15,000 on PyPI
openinference-instrumentation-dspyAuto-instruments DSPy applications to generate…
permissive · top 15,000 on PyPI
openinference-instrumentation-google-genaiAutomatically instruments Google GenAI SDK…
permissive · top 15,000 on PyPI
openinference-instrumentation-openaiAuto-instruments OpenAI Python SDK calls to…
permissive · top 5,000 on PyPI
llama-index-utils-workflowProvides visualization tools for LlamaIndex…
unclear · top 15,000 on PyPI
openinference-instrumentation-pydantic-aiAuto-instruments PydanticAI agents to emit…
permissive · top 15,000 on PyPI
arize-phoenix-otelWraps OpenTelemetry with Phoenix-aware defaults…
permissive · top 5,000 on PyPI