openinference-instrumentation-litellm
OpenInference liteLLM Instrumentation
What it is and what it does
This package wraps LiteLLM's core functions—completion, embedding, image generation, and Anthropic API calls—to automatically emit structured OpenTelemetry spans. It lets you see detailed traces of every LLM API call your application makes, including inputs, outputs, latency, and errors, without modifying your LiteLLM code.
You install it, instantiate LiteLLMInstrumentor, point it at a TracerProvider connected to an OpenTelemetry collector (like Arize Phoenix), and call instrument(). From that moment on, all instrumented LiteLLM functions emit traces. The package depends on opentelemetry-sdk, opentelemetry-instrumentation, and openinference-instrumentation to handle the tracing plumbing, and uses wrapt to hook into LiteLLM's function calls.
Use it for:
- Debug LLM application behavior by viewing detailed traces of completion calls, embeddings, and image generation in Arize Phoenix or similar collectors.
- Monitor production LLM services to track latency, error rates, and API usage across multiple LLM providers via OpenTelemetry exporters.
- Correlate LLM calls with application-level traces to understand end-to-end request flow in complex systems.
- Audit and log all LLM API interactions for compliance or troubleshooting without modifying existing LiteLLM code.
- Analyze Anthropic API call patterns and performance when using LiteLLM's Anthropic wrapper methods.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Auto-instruments LiteLLM function calls (completion, embedding, image generation, and Anthropic API methods) to emit OpenTelemetry-compatible traces for observability in tools like Arize Phoenix.
Yes, if you use LiteLLM and need observability. The package is actively maintained, has no known vulnerabilities, installs cleanly with low friction, and is Apache-licensed. It solves a real problem—seeing what your LLM calls are actually doing—with minimal code changes. Install it alongside an OpenTelemetry collector (Phoenix, AX, or your own) to get immediate tracing.
Install
openinference-instrumentation-litellm on PyPI
pip
pip install openinference-instrumentation-litellmuv
uv add openinference-instrumentation-litellmpoetry
poetry add openinference-instrumentation-litellmInstalling openinference-instrumentation-litellm
Before you install
Low friction: pure Python wheel with seven runtime dependencies, all standard observability libraries (opentelemetry-sdk, opentelemetry-instrumentation, openinference packages). Active maintenance with a release 2 days old and no known vulnerabilities.
License in practice
Apache-2.0 permissive license; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install openinference-instrumentation-litellm
from openinference.instrumentation.litellm import LiteLLMInstrumentor
from opentelemetry.sdk.trace import TracerProvider
tracer_provider = TracerProvider()
LiteLLMInstrumentor().instrument(tracer_provider=tracer_provider)
Requires Python 3.10 or later; LiteLLM and an OpenTelemetry exporter (e.g., Arize Phoenix) must be installed separately to actually collect and view traces.
Verify before relying
- Whether instrumentation overhead is negligible for high-volume LLM call scenarios.
- Support status for LiteLLM Proxy beyond the documented 100+ LLMs.
- Compatibility with custom LiteLLM provider implementations.
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-sdk, setuptools, wrapt |
| Maintenance | actively maintained — 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 468,654/month — #6,492 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openinference_instrumentation_litellm-0.1.37-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-google-genaiAutomatically instruments Google GenAI SDK…
permissive · top 15,000 on PyPI
openinference-instrumentation-llama-indexAuto-instruments LlamaIndex applications to…
permissive · top 15,000 on PyPI
arizeArize is a Python client library for…
permissive · top 5,000 on PyPI
openinference-instrumentation-anthropicAutomatically captures and exports traces from…
permissive · top 15,000 on PyPI
openinference-instrumentation-haystackAuto-instruments Haystack LLM pipelines and…
permissive · top 15,000 on PyPI
openinference-instrumentation-openaiAuto-instruments OpenAI Python SDK calls to…
permissive · top 5,000 on PyPI
openinference-semantic-conventionsDefines semantic conventions and standardized…
permissive · top 5,000 on PyPI
arize-otelWraps OpenTelemetry with Arize-aware defaults…
permissive · top 15,000 on PyPI
arize-phoenixPhoenix is an open-source AI observability…
unclear · top 5,000 on PyPI
openinference-instrumentation-agnoAuto-instruments Agno Agent applications to…
permissive · top 15,000 on PyPI