What is OpenInference?
OpenInference is Convenciones de trazado de OpenTelemetry e instrumentadores para apps LLM y de agentes. 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. To get started: instala los paquetes.
Resumen
OpenInference es un conjunto de convenciones de OpenTelemetry y librerías de instrumentación para trazar aplicaciones de IA. Define atributos de span estándar para las llamadas a LLM, la recuperación desde almacenes vectoriales, el uso de herramientas y los pasos de los agentes, de modo que las trazas de distintos frameworks describan las mismas cosas de la misma forma.
Está pensado para desarrolladores que crean aplicaciones LLM, RAG y de agentes y quieren ver qué hace realmente su código en producción. Los instrumentadores capturan automáticamente los spans de SDKs populares como OpenAI, LangChain, LlamaIndex, DSPy y AWS Bedrock con muy poco código por tu parte.
Como herramienta de observabilidad de LLM, OpenInference es la capa de datos, no el panel. Arize Phoenix la soporta de forma nativa, pero como se basa en OpenTelemetry puedes enviar las trazas a cualquier backend compatible con OpenTelemetry.
Qué hace
- Convenciones semánticas basadas en OpenTelemetry para spans de LLM, recuperación, herramientas y agentes
- Instrumentadores listos para usar en OpenAI, LangChain, LlamaIndex, DSPy, Bedrock, MistralAI, MCP y más
- Compatible con cualquier backend compatible con OpenTelemetry, con soporte nativo en Arize Phoenix
- Disponible para los SDKs de frameworks en Python y JavaScript
- Especificación independiente del transporte y del formato (utilizable con JSON, ProtoBuf, DataFrames)
- Decoradores y utilidades reutilizables para instrumentar tu propio código
Primeros pasos
Instala un instrumentador para el SDK que uses, indícale un proveedor de tracer de OpenTelemetry y tus llamadas a LLM empezarán a generar trazas. El ejemplo siguiente usa el instrumentador de OpenAI con un colector Phoenix local.
Instala los paquetes
Instala el instrumentador de OpenAI junto con el SDK de OpenTelemetry y un exportador. Cambia por el instrumentador de tu framework si no usas OpenAI.
pip install openinference-instrumentation-openai "openai>=1.26" arize-phoenix opentelemetry-sdk opentelemetry-exporter-otlpRegistra un proveedor de tracer e instrumenta
Configura un proveedor de tracer que exporte los spans y luego llama al instrumentador. A partir de aquí, las llamadas normales a OpenAI se trazan automáticamente.
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 repositorio oficial para lo último.
Cuándo usarlo
- Traza y depura un pipeline RAG para ver la recuperación, los prompts y las respuestas del modelo en un solo lugar
- Añade observabilidad de LLM a una app de agentes sin escribir código de spans personalizado para cada framework
- Envía trazas de IA estandarizadas a Arize Phoenix u otro backend de OpenTelemetry
- Compara el comportamiento entre frameworks (OpenAI, LangChain, LlamaIndex) usando un único esquema de spans compartido
How OpenInference compares
OpenInference alongside other open-source observability & llmops tools AI/TLDR tracks, ranked by GitHub stars.
| Herramienta | Estrellas | Qué hace |
|---|---|---|
| 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 | Convenciones de trazado de OpenTelemetry e instrumentadores para apps LLM y de agentes |

