--- id: openinference-instrumentation-llama-index version: "4.4.5" license: Apache-2.0 license_treatment: permissive maintenance: active --- # openinference-instrumentation-llama-index — OpenInference LlamaIndex Instrumentation License: permissive · Maintenance: active · Downloads: 368.9K/mo ## 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 above — 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 pip install openinference-instrumentation-llama-index uv add openinference-instrumentation-llama-index 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_current - Install friction: low - Maintenance: active - Downloads: 368.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags llama-index tracing instrumentation, opentelemetry llama-index, llm observability tracing, arize phoenix integration, llama-index debugging traces, openinference instrumentation, llm application monitoring, llm-observability, opentelemetry, instrumentation [View on SkillFed](https://skillfed.io/packages/openinference-instrumentation-llama-index) · [View on PyPI](https://pypi.org/project/openinference-instrumentation-llama-index/)