OpenLLMetry is a project name, not a single installable PyPI package. It refers to two related but distinct things that must not be confused: (1) The traceloop-sdk — the high-level Traceloop SDK (already documented separately) that wraps OpenLLMetry auto-instrumentation behind Traceloop.init(). (2) Standalone opentelemetry-instrumentation-* packages — individual OTel instrumentors for specific LLM providers/frameworks, published from the traceloop/openllmetry GitHub monorepo. These can be used WITHOUT traceloop-sdk in any existing OpenTelemetry setup. ECOSYSTEM CONFUSION: There is a second, competing instrumentation ecosystem called OpenInference (from Arize-ai/openinference), which publishes openinference-instrumentation-* packages. Both OpenLLMetry and OpenInference instrumentors instrument the same providers (OpenAI, LangChain, etc.), use different span attribute schemas, and route to different preferred backends. They are NOT interchangeable.
Install & Compatibility
Where this runs
tested against v? · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
15/25 runs
15/25 runs
py 3.11
15/25 runs
15/25 runs
py 3.12
15/25 runs
15/25 runs
py 3.13
15/25 runs
15/25 runs
py 3.9
15/25 runs
15/25 runs
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
from opentelemetry.instrumentation.openai import OpenAIInstrumentor
TracerProvider must be configured before calling .instrument(). Instrumentors do not create or manage the TracerProvider — that is your responsibility. If you want zero-config setup, use traceloop-sdk instead (it manages the TracerProvider for you).
# Standalone usage — no traceloop-sdk required
# Requires only: opentelemetry-sdk + opentelemetry-exporter-otlp + individual instrumentors
import os
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
# 1. Set up TracerProvider and exporter (any OTLP backend)
tracer_provider = TracerProvider()
exporter = OTLPSpanExporter(
endpoint='http://localhost:4318/v1/traces', # Jaeger, Grafana, Phoenix, Datadog, etc.
)
tracer_provider.add_span_processor(BatchSpanProcessor(exporter))
trace.set_tracer_provider(tracer_provider)
# 2. Instrument providers — must call before importing/using the library
from opentelemetry.instrumentation.openai import OpenAIInstrumentor
from opentelemetry.instrumentation.langchain import LangChainInstrumentor
OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)
LangChainInstrumentor().instrument(tracer_provider=tracer_provider)
# 3. Use your libraries normally — spans are captured automatically
import openai
client = openai.OpenAI(api_key=os.environ['OPENAI_API_KEY'])
response = client.chat.completions.create(
model='gpt-4o',
messages=[{'role': 'user', 'content': 'Hello!'}]
)
# To suppress prompt/completion content from traces (PII/privacy):
os.environ['TRACELOOP_TRACE_CONTENT'] = 'false'
# Must be set before .instrument() is called
# Using with traceloop-sdk (alternative — SDK manages the provider):
# from traceloop.sdk import Traceloop
# Traceloop.init(app_name='my-app') # handles all of the above automatically
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.