What is OpenInference?
OpenInference is a set of OpenTelemetry conventions and instrumentation libraries for tracing AI applications. It defines standard span attributes for LLM calls, retrieval from vector stores, tool use, and agent steps, so traces from different frameworks describe the same things in the same way. It sits in the Observability & LLMOps category of the Evaluation & Production Ops tools and is open-source, written in Python and licensed Apache-2.0.
Overview
OpenInference is a set of OpenTelemetry conventions and instrumentation libraries for tracing AI applications. It defines standard span attributes for LLM calls, retrieval from vector stores, tool use, and agent steps, so traces from different frameworks describe the same things in the same way.
It is meant for developers who build LLM, RAG, and agent applications and want to see what their code is actually doing in production. The instrumentors auto-capture spans from popular SDKs such as OpenAI, LangChain, LlamaIndex, DSPy, and AWS Bedrock with little code on your side.
As an LLM observability tool, OpenInference is the data layer rather than the dashboard. It is natively supported by Arize Phoenix, but because it builds on OpenTelemetry you can send the traces to any OpenTelemetry-compatible backend.
What it does
- OpenTelemetry-based semantic conventions for LLM, retrieval, tool, and agent spans
- Drop-in instrumentors for OpenAI, LangChain, LlamaIndex, DSPy, Bedrock, MistralAI, MCP, and more
- Works with any OpenTelemetry-compatible backend, with native support in Arize Phoenix
- Available for Python and JavaScript framework SDKs
- Transport- and format-agnostic spec (usable with JSON, ProtoBuf, DataFrames)
- Reusable decorators and helpers for instrumenting your own code
Getting started
Install an instrumentor for the SDK you use, point it at an OpenTelemetry tracer provider, and your LLM calls start producing traces. The example below uses the OpenAI instrumentor with a local Phoenix collector.
Install the packages
Install the OpenAI instrumentor along with the OpenTelemetry SDK and an exporter. Swap in the instrumentor for your framework if you are not using OpenAI.
pip install openinference-instrumentation-openai "openai>=1.26" arize-phoenix opentelemetry-sdk opentelemetry-exporter-otlpRegister a tracer provider and instrument
Set up a tracer provider that exports spans, then call the instrumentor. After this, normal OpenAI calls are traced automatically.
import openai
from openinference.instrumentation.openai import OpenAIInstrumentor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
endpoint = "http://127.0.0.1:6006/v1/traces"
tracer_provider = trace_sdk.TracerProvider()
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))
OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)
if __name__ == "__main__":
client = openai.OpenAI()
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Write a haiku."}],
max_tokens=20,
)
print(response.choices[0].message.content)Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Trace and debug a RAG pipeline to see retrieval, prompts, and model responses in one place
- Add LLM observability to an agent app without writing custom span code for each framework
- Send standardized AI traces to Arize Phoenix or another OpenTelemetry backend
- Compare behavior across frameworks (OpenAI, LangChain, LlamaIndex) using one shared span schema
How OpenInference compares
OpenInference alongside other open-source observability & llmops tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Langfuse | ★ 38k | A self-hostable platform for tracing LLM and agent calls, managing prompts, and running evaluations to debug and improve AI applications. |
| Opik | ★ 23.5k | An open-source platform from Comet for tracing, evaluating, and monitoring LLM applications, RAG systems, and agent workflows with dashboards and LLM-as-judge metrics. |
| RagaAI Catalyst | ★ 16.2k | Python SDK that combines agentic tracing, metric evaluation, dataset and prompt management, guardrails and red-teaming for LLM and multi-agent applications. |
| CodeBurn | ★ 11.9k | Reads the session files 41 AI coding tools already write to disk and breaks token spend down by model, project and task — no API keys or proxy — then flags waste and correlates spend with git commits. |
| TensorZero | ★ 11.7k | An open-source LLMOps platform that puts a single gateway in front of every major LLM provider and adds observability, evaluation, optimization, and A/B testing. |
| Evidently | ★ 8.1k | A monitoring and evaluation framework for ML and LLM systems that tracks output quality, drift, and test results over time with reports and dashboards. |
| Star Office UI | ★ 7.6k | A self-hosted pixel-art office that shows an AI agent's live work state, with a character moving between desk, sofa and bug corner as it writes, idles or hits errors; built for OpenClaw but drivable by any HTTP client. |
| OpenInference | ★ 1.3k | OpenTelemetry tracing conventions and instrumentors for LLM and agent apps |

