OpenInference OpenLLMetry (Traceloop)
Python auto-instrumentation library for OpenLLMetry. This library allows you to convert OpenLLMetry traces to OpenInference, which is OpenTelemetry compatible, and view those traces in Arize Phoenix or Arize AX.
Installation
pip install openinference-instrumentation-openllmetry
Quickstart
This quickstart shows you how to view your OpenLLMetry traces in Phoenix.
Install required packages.
pip install arize-phoenix opentelemetry-sdk opentelemetry-exporter-otlp opentelemetry-instrumentation-openai
Start Phoenix in the background as a collector. By default, it listens on http://localhost:6006. You can visit the app via a browser at the same address. (Phoenix does not send data over the internet. It only operates locally on your machine.)
phoenix serve
Here's a simple example that demonstrates how to view convert OpenLLMetry traces into OpenInference and view those traces in Phoenix:
import os
import grpc
import openai
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
from phoenix.otel import register
from openinference.instrumentation.openllmetry import OpenInferenceSpanProcessor
from opentelemetry.instrumentation.openai import OpenAIInstrumentor
# Set your OpenAI API key
os.environ["OPENAI_API_KEY"] = "YOUR_OPENAI_API_KEY"
# Set up the tracer provider
tracer_provider = register(
project_name="default" #Phoenix project name
)
tracer_provider.add_span_processor(OpenInferenceSpanProcessor())
tracer_provider.add_span_processor(
BatchSpanProcessor(
OTLPSpanExporter(
endpoint="http://localhost:4317", #if using phoenix cloud, change to phoenix cloud endpoint (phoenix cloud space -> settings -> endpoint/hostname)
headers={},
compression=grpc.Compression.Gzip, # use enum instead of string
)
)
)
OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)
# Define and invoke your OpenAI model
client = openai.OpenAI()
messages = [
{"role": "user", "content": "What is the national food of Yemen?"}
]
response = client.chat.completions.create(
model="gpt-4",
messages=messages,
)
# Now view your converted OpenLLMetry traces in Phoenix!
This example:
- Uses OpenLLMetry Instrumentor to instrument the application.
- Defines a simple OpenAI model and runs a query
- Queries are exported to Phoenix using a span processor.
The traces will be visible in the Phoenix UI at http://localhost:6006.
More Info
Metadata
Release files for openinference-instrumentation-openllmetry 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openinference_instrumentation_openllmetry-0.1.16.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openinference_instrumentation_openllmetry-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.4 kB
Release files / openinference_instrumentation_openllmetry-0.1.16.tar.gz
| Download URL | openinference_instrumentation_openllmetry-0.1.16.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5626d44b2442e9813982f5a282af202fc545aa1db7d7381fafea9a9df49f90a
|
|
BLAKE2b-256 checksum How to use checksums |
036943a603cc089e410bc372afce69ddf263ba840294a169c27fb3f448c678e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / openinference_instrumentation_openllmetry-0.1.16-py3-none-any.whl
| Download URL | openinference_instrumentation_openllmetry-0.1.16-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d02f3d31aaaccb2c1e85a142392f5e16ffdf6254ac75bf90b9fec1966f8ff0e5
|
|
BLAKE2b-256 checksum How to use checksums |
b66c1b34fff4a2df92f3d1c68ddf348955f07fdc15ea077d79b4cb6f208e9222
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency log