skillfed

opentelemetry-instrumentation-llamaindex

OpenTelemetry LlamaIndex instrumentation

opentelemetry-instrumentation-llamaindex v0.62.3 6.9M downloads/30d#1,808 on PyPI7,377
Permissive license Apache-2.0 Active released

What it is and what it does

This package integrates OpenTelemetry tracing into LlamaIndex applications, automatically capturing spans for LLM calls, embeddings, and other operations. It hooks into LlamaIndex to record detailed traces that flow through your observability stack, making it possible to see exactly what your application is doing at each step.

By default, the instrumentation logs prompts, completions, and embeddings as span attributes, giving you full visibility into your LLM application's behavior. This can be disabled by setting the TRACELOOP_TRACE_CONTENT environment variable to false if you need to protect sensitive user data or reduce trace size. The package requires Python 3.10 or later and depends on the core OpenTelemetry API and instrumentation libraries.

Use it for:

  • Debug LlamaIndex application behavior by tracing LLM calls and embeddings through your system.
  • Send traces to an OpenTelemetry backend (Jaeger, Datadog, etc.) to monitor production LLM applications.
  • Analyze latency and performance of LLM operations within a larger application.
  • Audit and log prompts and completions for compliance or quality evaluation purposes.
  • Correlate LLM calls with other application traces for end-to-end observability.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds distributed tracing to LlamaIndex applications using OpenTelemetry, capturing LLM calls, embeddings, and application flow as spans for observability and debugging.

Yes, if you are building LlamaIndex applications and need observability. The package is actively maintained, has no security vulnerabilities, installs with low friction, and integrates cleanly with the OpenTelemetry ecosystem. Be aware that prompts and completions are logged by default—disable TRACELOOP_TRACE_CONTENT if handling sensitive data.

Install

opentelemetry-instrumentation-llamaindex on PyPI

pip

pip install opentelemetry-instrumentation-llamaindex

uv

uv add opentelemetry-instrumentation-llamaindex

poetry

poetry add opentelemetry-instrumentation-llamaindex

Installing opentelemetry-instrumentation-llamaindex

Before you install

Low friction installation with no compiled dependencies. Actively maintained with a recent release (4 days old) and steady upstream activity. Depends on standard OpenTelemetry packages.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.

Quickstart

pip install opentelemetry-instrumentation-llamaindex

from opentelemetry.instrumentation.llamaindex import LlamaIndexInstrumentor

LlamaIndexInstrumentor().instrument()

Requires Python 3.10 or later. Requires an OpenTelemetry exporter and backend to be configured separately to actually send traces somewhere.

Verify before relying

  • Whether the instrumentation supports all LlamaIndex components or only a subset of the API surface.
  • Performance overhead of tracing when TRACELOOP_TRACE_CONTENT is enabled versus disabled.
  • Compatibility with specific OpenTelemetry exporters and backends.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<4,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — inflection, opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions-ai, opentelemetry-semantic-conventions
Maintenance actively maintained — 4 days since the last release
Last repo commit
First released
Downloads 6,928,352/month — #1,808 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: opentelemetry_instrumentation_llamaindex-0.62.3-py3-none-any.whl

Tags

opentelemetry llamaindex tracingllm application observabilitydistributed tracing for llama indexinstrument llamaindex spansllm debugging and monitoringtrace llm calls opentelemetryllamaindex instrumentation
observabilityllm-tracinginstrumentation

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

llama-index-instrumentation

Provides instrumentation hooks for…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-ollama

Adds distributed tracing to Ollama Python…

permissive · top 5,000 on PyPI

raindrop-ai

Instrument LLM applications with event tracking…

permissive · top 15,000 on PyPI

openlit

OpenLIT provides OpenTelemetry-native…

permissive · top 15,000 on PyPI

opentelemetry-instrumentation-langchain

Adds distributed tracing to Langchain LLM…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-haystack

Adds distributed tracing to Haystack LLM…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-litellm

Adds OpenTelemetry tracing to LiteLLM,…

permissive · top 15,000 on PyPI

opentelemetry-instrumentation-transformers

Adds distributed tracing to HuggingFace…

permissive · top 5,000 on PyPI

lumigo-tracer

Lumigo-tracer instruments Python Lambda…

permissive · top 15,000 on PyPI

traceloop-sdk

Traceloop SDK instruments LLM applications to…

permissive · top 5,000 on PyPI