--- id: opentelemetry-instrumentation-llamaindex version: "0.62.3" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opentelemetry-instrumentation-llamaindex — OpenTelemetry LlamaIndex instrumentation License: permissive · Maintenance: active · Downloads: 6.9M/mo ## 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 above — 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 pip install opentelemetry-instrumentation-llamaindex uv add opentelemetry-instrumentation-llamaindex 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_current - Install friction: low - Maintenance: active - Downloads: 6.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags opentelemetry llamaindex tracing, llm application observability, distributed tracing for llama index, instrument llamaindex spans, llm debugging and monitoring, trace llm calls opentelemetry, llamaindex instrumentation, observability, llm-tracing, instrumentation [View on SkillFed](https://skillfed.io/packages/opentelemetry-instrumentation-llamaindex) · [View on PyPI](https://pypi.org/project/opentelemetry-instrumentation-llamaindex/)