skillfed

openinference-instrumentation-llama-index

OpenInference LlamaIndex Instrumentation

openinference-instrumentation-llama-index v4.4.5 368.9K downloads/30d#7,187 on PyPI1,147
Permissive license Apache-2.0 Active released

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-index

uv

uv add openinference-instrumentation-llama-index

poetry

poetry add openinference-instrumentation-llama-index

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

llama-index tracing instrumentationopentelemetry llama-indexllm observability tracingarize phoenix integrationllama-index debugging tracesopeninference instrumentationllm application monitoring
llm-observabilityopentelemetryinstrumentation

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

openinference-instrumentation-agno

Auto-instruments Agno Agent applications to…

permissive · top 15,000 on PyPI

openinference-instrumentation-anthropic

Automatically captures and exports traces from…

permissive · top 15,000 on PyPI

openinference-instrumentation-litellm

Auto-instruments LiteLLM function calls…

permissive · top 15,000 on PyPI

openinference-instrumentation-haystack

Auto-instruments Haystack LLM pipelines and…

permissive · top 15,000 on PyPI

openinference-instrumentation-dspy

Auto-instruments DSPy applications to generate…

permissive · top 15,000 on PyPI

openinference-instrumentation-google-genai

Automatically instruments Google GenAI SDK…

permissive · top 15,000 on PyPI

openinference-instrumentation-openai

Auto-instruments OpenAI Python SDK calls to…

permissive · top 5,000 on PyPI

llama-index-utils-workflow

Provides visualization tools for LlamaIndex…

unclear · top 15,000 on PyPI

openinference-instrumentation-pydantic-ai

Auto-instruments PydanticAI agents to emit…

permissive · top 15,000 on PyPI

arize-phoenix-otel

Wraps OpenTelemetry with Phoenix-aware defaults…

permissive · top 5,000 on PyPI