https://github.com/arize-ai/openinference
OpenTelemetry Instrumentation for AI Observability
https://github.com/arize-ai/openinference
aiops gemini hacktoberfest haystack langchain langraph llamaindex llmops llms mcp openai openai-agents opentelemetry smolagents telemetry tracing vercel vertex
Last synced: 2 days ago
JSON representation
OpenTelemetry Instrumentation for AI Observability
- Host: GitHub
- URL: https://github.com/arize-ai/openinference
- Owner: Arize-ai
- License: apache-2.0
- Created: 2023-12-26T17:33:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-13T00:28:47.000Z (9 months ago)
- Last Synced: 2025-05-13T01:28:23.167Z (9 months ago)
- Topics: aiops, gemini, hacktoberfest, haystack, langchain, langraph, llamaindex, llmops, llms, mcp, openai, openai-agents, opentelemetry, smolagents, telemetry, tracing, vercel, vertex
- Language: Python
- Homepage: https://arize-ai.github.io/openinference/
- Size: 6.68 MB
- Stars: 404
- Watchers: 10
- Forks: 89
- Open Issues: 98
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY
Awesome Lists containing this project
- awesome-ChatGPT-repositories - openinference - OpenTelemetry Instrumentation for AI Observability (Langchain)
README
OpenInference is a set of conventions and plugins that is complimentary to [OpenTelemetry](https://opentelemetry.io/) to
enable tracing of AI applications. OpenInference is natively supported
by [arize-phoenix](https://github.com/Arize-ai/phoenix), but can be used with any OpenTelemetry-compatible backend as
well.
## Specification
The OpenInference specification is edited in markdown files found in the [spec directory](./spec/). It's designed to
provide insight into the invocation of LLMs and the surrounding application context such as retrieval from vector stores
and the usage of external tools such as search engines or APIs. The specification is transport and file-format agnostic,
and is intended to be used in conjunction with other specifications such as JSON, ProtoBuf, and DataFrames.
## Instrumentation
OpenInference provides a set of instrumentations for popular machine learning SDKs and frameworks in a variety of
languages.
## Python
### Libraries
| Package | Description | Version |
|-------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`openinference-semantic-conventions`](./python/openinference-semantic-conventions) | Semantic conventions for tracing of LLM Apps. | [](https://pypi.python.org/pypi/openinference-semantic-conventions) |
| [`openinference-instrumentation`](./python/openinference-instrumentation) | Reusable utilities, decorators, configurations, and helpers for instrumentation. | [](https://pypi.python.org/pypi/openinference-instrumentation) |
| [`openinference-instrumentation-agno`](./python/instrumentation/openinference-instrumentation-agno) | OpenInference Instrumentation for Agno Agents. | [](https://pypi.python.org/pypi/openinference-instrumentation-agno) |
| [`openinference-instrumentation-openai`](./python/instrumentation/openinference-instrumentation-openai) | OpenInference Instrumentation for OpenAI SDK. | [](https://pypi.python.org/pypi/openinference-instrumentation-openai) |
| [`openinference-instrumentation-openai-agents`](./python/instrumentation/openinference-instrumentation-openai-agents) | OpenInference Instrumentation for OpenAI Agents SDK. | [](https://pypi.python.org/pypi/openinference-instrumentation-openai-agents) |
| [`openinference-instrumentation-llama-index`](./python/instrumentation/openinference-instrumentation-llama-index) | OpenInference Instrumentation for LlamaIndex. | [](https://pypi.python.org/pypi/openinference-instrumentation-llama-index) |
| [`openinference-instrumentation-dspy`](./python/instrumentation/openinference-instrumentation-dspy) | OpenInference Instrumentation for DSPy. | [](https://pypi.python.org/pypi/openinference-instrumentation-dspy) |
| [`openinference-instrumentation-bedrock`](./python/instrumentation/openinference-instrumentation-bedrock) | OpenInference Instrumentation for AWS Bedrock. | [](https://pypi.python.org/pypi/openinference-instrumentation-bedrock) |
| [`openinference-instrumentation-langchain`](./python/instrumentation/openinference-instrumentation-langchain) | OpenInference Instrumentation for LangChain. | [](https://pypi.python.org/pypi/openinference-instrumentation-langchain) |
| [`openinference-instrumentation-mcp`](./python/instrumentation/openinference-instrumentation-mcp) | OpenInference Instrumentation for MCP. | [](https://pypi.python.org/pypi/openinference-instrumentation-mcp) |
| [`openinference-instrumentation-mistralai`](./python/instrumentation/openinference-instrumentation-mistralai) | OpenInference Instrumentation for MistralAI. | [](https://pypi.python.org/pypi/openinference-instrumentation-mistralai) |
| [`openinference-instrumentation-portkey`](./python/instrumentation/openinference-instrumentation-portkey) | OpenInference Instrumentation for Portkey. | [](https://pypi.python.org/pypi/openinference-instrumentation-portkey) |
| [`openinference-instrumentation-guardrails`](./python/instrumentation/openinference-instrumentation-guardrails) | OpenInference Instrumentation for Guardrails. | [](https://pypi.python.org/pypi/openinference-instrumentation-guardrails) |
| [`openinference-instrumentation-vertexai`](./python/instrumentation/openinference-instrumentation-vertexai) | OpenInference Instrumentation for VertexAI. | [](https://pypi.python.org/pypi/openinference-instrumentation-vertexai) |
| [`openinference-instrumentation-crewai`](./python/instrumentation/openinference-instrumentation-crewai) | OpenInference Instrumentation for CrewAI. | [](https://pypi.python.org/pypi/openinference-instrumentation-crewai) |
| [`openinference-instrumentation-haystack`](./python/instrumentation/openinference-instrumentation-haystack) | OpenInference Instrumentation for Haystack. | [](https://pypi.python.org/pypi/openinference-instrumentation-haystack) |
| [`openinference-instrumentation-litellm`](./python/instrumentation/openinference-instrumentation-litellm) | OpenInference Instrumentation for liteLLM. | [](https://pypi.python.org/pypi/openinference-instrumentation-litellm) |
| [`openinference-instrumentation-groq`](./python/instrumentation/openinference-instrumentation-groq) | OpenInference Instrumentation for Groq. | [](https://pypi.python.org/pypi/openinference-instrumentation-groq) |
| [`openinference-instrumentation-instructor`](./python/instrumentation/openinference-instrumentation-instructor) | OpenInference Instrumentation for Instructor. | [](https://pypi.python.org/pypi/openinference-instrumentation-instructor) |
| [`openinference-instrumentation-anthropic`](./python/instrumentation/openinference-instrumentation-anthropic) | OpenInference Instrumentation for Anthropic. | [](https://pypi.python.org/pypi/openinference-instrumentation-anthropic) |
| [`openinference-instrumentation-beeai`](./python/instrumentation/openinference-instrumentation-beeai) | OpenInference Instrumentation for BeeAI. | [](https://pypi.python.org/pypi/openinference-instrumentation-beeai) |
| [`openinference-instrumentation-google-genai`](./python/instrumentation/openinference-instrumentation-google-genai) | OpenInference Instrumentation for Google GenAI. | [](https://pypi.python.org/pypi/openinference-instrumentation-google-genai) |
| [`openinference-instrumentation-google-adk`](./python/instrumentation/openinference-instrumentation-google-adk) | OpenInference Instrumentation for Google ADK. | [](https://pypi.python.org/pypi/openinference-instrumentation-google-adk) |
| [`openinference-instrumentation-autogen-agentchat`](./python/instrumentation/openinference-instrumentation-autogen-agentchat) | OpenInference Instrumentation for Microsoft Autogen AgentChat. | [](https://pypi.python.org/pypi/openinference-instrumentation-autogen-agentchat) |
| [`openinference-instrumentation-pydantic-ai`](./python/instrumentation/openinference-instrumentation-pydantic-ai) | OpenInference Instrumentation for PydanticAI. | [](https://pypi.python.org/pypi/openinference-instrumentation-pydantic-ai) |
| [`openinference-instrumentation-smolagents`](./python/instrumentation/openinference-instrumentation-smolagents) | OpenInference Instrumentation for smolagents. | [](https://pypi.python.org/pypi/openinference-instrumentation-smolagents) |
| [`openinference-instrumentation-pipecat`](./python/instrumentation/openinference-instrumentation-pipecat) | OpenInference Instrumentation for Pipecat. | [](https://pypi.python.org/pypi/openinference-instrumentation-pipecat) |
| [`openinference-instrumentation-agentspec`](./python/instrumentation/openinference-instrumentation-agentspec) | OpenInference Instrumentation for Open Agent Specification. | [](https://pypi.python.org/pypi/openinference-instrumentation-agentspec) |
## Span Processors
Normalize and convert data across other instrumentation libraries by adding span processors that unify data.
| Package | Description | Version |
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`openinference-instrumentation-openlit`](./python/instrumentation/openinference-instrumentation-openlit) | OpenInference Span Processor for OpenLIT traces. | [](https://pypi.python.org/pypi/openinference-instrumentation-openlit) |
| [`openinference-instrumentation-openllmetry`](./python/instrumentation/openinference-instrumentation-openllmetry) | OpenInference Span Processor for OpenLLMetry (Traceloop) traces. | [](https://pypi.python.org/pypi/openinference-instrumentation-openllmetry) |
### Examples
| Name | Description | Complexity Level |
| ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ---------------- |
| [Agno](python/instrumentation/openinference-instrumentation-agno/examples/) | Agno agent examples | Beginner |
| [OpenAI SDK](python/instrumentation/openinference-instrumentation-openai/examples/) | OpenAI Python SDK, including chat completions and embeddings | Beginner |
| [MistralAI SDK](python/instrumentation/openinference-instrumentation-mistralai/examples/) | MistralAI Python SDK | Beginner |
| [VertexAI SDK](python/instrumentation/openinference-instrumentation-vertexai/examples/) | VertexAI Python SDK | Beginner |
| [LlamaIndex](python/instrumentation/openinference-instrumentation-llama-index/examples/) | LlamaIndex query engines | Beginner |
| [DSPy](python/instrumentation/openinference-instrumentation-dspy/examples/) | DSPy primitives and custom RAG modules | Beginner |
| [Boto3 Bedrock Client](python/instrumentation/openinference-instrumentation-bedrock/examples/) | Boto3 Bedrock client | Beginner |
| [LangChain](python/instrumentation/openinference-instrumentation-langchain/examples/) | LangChain primitives and simple chains | Beginner |
| [LiteLLM](python/instrumentation/openinference-instrumentation-litellm/) | A lightweight LiteLLM framework | Beginner |
| [LiteLLM Proxy](python/instrumentation/openinference-instrumentation-litellm/examples/litellm-proxy/) | LiteLLM Proxy to log OpenAI, Azure, Vertex, Bedrock | Beginner |
| [Groq](python/instrumentation/openinference-instrumentation-groq/examples/) | Groq and AsyncGroq chat completions | Beginner |
| [Anthropic](python/instrumentation/openinference-instrumentation-anthropic/examples/) | Anthropic Messages client | Beginner |
| [BeeAI](python/instrumentation/openinference-instrumentation-beeai/examples/) | Agentic instrumentation in the BeeAI framework | Beginner |
| [LlamaIndex + Next.js Chatbot](python/examples/llama-index/) | A fully functional chatbot using Next.js and a LlamaIndex FastAPI backend | Intermediate |
| [LangServe](python/examples/langserve/) | A LangChain application deployed with LangServe using custom metadata on a per-request basis | Intermediate |
| [DSPy](python/examples/dspy-rag-fastapi/) | A DSPy RAG application using FastAPI, Weaviate, and Cohere | Intermediate |
| [Haystack](python/instrumentation/openinference-instrumentation-haystack/examples/) | A Haystack QA RAG application | Intermediate |
| [OpenAI Agents](python/instrumentation/openinference-instrumentation-openai-agents/examples/) | OpenAI Agents with handoffs | Intermediate |
| [Autogen AgentChat](python/instrumentation/openinference-instrumentation-autogen-agentchat/examples/) | Microsoft Autogen Assistant Agent and Team Chat | Intermediate |
| [PydanticAI](python/instrumentation/openinference-instrumentation-pydantic-ai/examples/) | PydanticAI agent examples | Intermediate |
| [Pipecat](python/instrumentation/openinference-instrumentation-pipecat/examples/) | Pipecat application examples | Intermediate |
## JavaScript
### Libraries
| Package | Description | Version |
| ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@arizeai/openinference-semantic-conventions`](./js/packages/openinference-semantic-conventions) | Semantic conventions for tracing of LLM Apps. | [](https://www.npmjs.com/package/@arizeai/openinference-semantic-conventions) |
| [`@arizeai/openinference-core`](./js/packages/openinference-core) | Reusable utilities, configuration, and helpers for instrumentation. | [](https://www.npmjs.com/package/@arizeai/openinference-core) |
| [`@arizeai/openinference-instrumentation-bedrock`](./js/packages/openinference-instrumentation-bedrock) | OpenInference Instrumentation for AWS Bedrock. | [](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-bedrock) |
| [`@arizeai/openinference-instrumentation-bedrock-agent-runtime`](./js/packages/openinference-instrumentation-bedrock-agent-runtime) | OpenInference Instrumentation for AWS Bedrock Agent Runtime. | [](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-bedrock-agent-runtime) |
| [`@arizeai/openinference-instrumentation-beeai`](./js/packages/openinference-instrumentation-beeai) | OpenInference Instrumentation for BeeAI. | [](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-beeai) |
| [`@arizeai/openinference-instrumentation-langchain`](./js/packages/openinference-instrumentation-langchain) | OpenInference Instrumentation for LangChain.js. | [](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-langchain) |
| [`@arizeai/openinference-instrumentation-mcp`](./js/packages/openinference-instrumentation-mcp) | OpenInference Instrumentation for MCP. | [](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-mcp) |
| [`@arizeai/openinference-instrumentation-openai`](./js/packages/openinference-instrumentation-openai) | OpenInference Instrumentation for OpenAI SDK. | [](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-openai) |
| [`@arizeai/openinference-instrumentation-anthropic`](./js/packages/openinference-instrumentation-anthropic) | OpenInference Instrumentation for the Anthropic SDK. | [](https://www.npmjs.com/package/@arizeai/openinference-instrumentation-anthropic) |
| [`@arizeai/openinference-vercel`](./js/packages/openinference-vercel) | OpenInference Support for Vercel AI SDK. | [](https://www.npmjs.com/package/@arizeai/openinference-vercel) |
| [`@arizeai/openinference-genai`](./js/packages/openinference-genai) | OpenInference Support for GenAI conventions | [](https://www.npmjs.com/package/@arizeai/openinference-genai) |
| [`@arizeai/openinference-mastra`](./js/packages/openinference-mastra) | OpenInference Support for Mastra. | [](https://www.npmjs.com/package/@arizeai/openinference-mastra) |
### Examples
| Name | Description | Complexity Level |
| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| [OpenAI SDK](js/examples/openai) | OpenAI Node.js client | Beginner |
| [BeeAI framework - ReAct agent](js/packages/openinference-instrumentation-beeai/examples/run-react-agent.ts) | Agentic `ReActAgent` instrumentation in the BeeAI framework | Beginner |
| [BeeAI framework - ToolCalling agent](js/packages/openinference-instrumentation-beeai/examples/run-toolcalling-agent.ts) | Agentic `ToolCallingAgent` instrumentation in the BeeAI framework | Beginner |
| [BeeAI framework - LLM](js/packages/openinference-instrumentation-beeai/examples/run-llm.ts) | See how to run instrumentation only for the specific LLM module part in the BeeAI framework | Beginner |
| [LlamaIndex Express App](js/examples/llama-index-express) | A fully functional LlamaIndex chatbot with a Next.js frontend and a LlamaIndex Express backend, instrumented using `openinference-instrumentation-openai` | Intermediate |
| [LangChain OpenAI](js/packages/openinference-instrumentation-langchain/examples) | A simple script to call OpenAI via LangChain, instrumented using `openinference-instrumentation-langchain` | Beginner |
| [LangChain RAG Express App](js/examples/langchain-express) | A fully functional LangChain chatbot that uses RAG to answer user questions. It has a Next.js frontend and a LangChain Express backend, instrumented using `openinference-instrumentation-langchain` | Intermediate |
| [Next.js + OpenAI](js/examples/nextjs-openai-simple/) | A Next.js 13 project bootstrapped with `create-next-app` that uses OpenAI to generate text | Beginner |
## Java
### Libraries
| Package | Description | Version |
| --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`openinference-semantic-conventions`](./java/openinference-semantic-conventions) | Semantic conventions for tracing of LLM Apps. | [](https://central.sonatype.com/artifact/com.arize/openinference-semantic-conventions) |
| [`openinference-instrumentation`](./java/openinference-instrumentation) | Base instrumentation utilities. | [](https://central.sonatype.com/artifact/com.arize/openinference-instrumentation) |
| [`openinference-instrumentation-langchain4j`](./java/instrumentation/openinference-instrumentation-langchain4j) | OpenInference Instrumentation for LangChain4j. | [](https://central.sonatype.com/artifact/com.arize/openinference-instrumentation-langchain4j) |
| [`openinference-instrumentation-springAI`](./java/instrumentation/openinference-instrumentation-springAI) | OpenInference Instrumentation for Spring AI. | [](https://central.sonatype.com/artifact/com.arize/openinference-instrumentation-springAI) |
### Examples
| Name | Description | Complexity Level |
| -------------------------------------------------------- | ---------------------------------------------- | ---------------- |
| [LangChain4j Example](java/examples/langchain4j-example) | Simple example using LangChain4j with OpenAI | Beginner |
| [Spring AI Example](java/examples/spring-ai-example) | Spring AI example with OpenAI and tool calling | Beginner |
## Supported Destinations
OpenInference supports the following destinations as span collectors.
- β
[Arize Phoenix](https://github.com/Arize-ai/phoenix)
- β
[Arize AX](https://arize.com/)
- β
Any OTEL-compatible collector
## Community
Join our community to connect with thousands of machine learning practitioners and LLM observability enthusiasts!
- π Join our [Slack community](https://join.slack.com/t/arize-ai/shared_invite/zt-3lqwr2oc3-7rhdyYEh82zJL_UhPKrb0A).
- π‘ Ask questions and provide feedback in the _#phoenix-support_ channel.
- π Leave a star on our [GitHub](https://github.com/Arize-ai/openinference).
- π Report bugs with [GitHub Issues](https://github.com/Arize-ai/openinference/issues).
- π Follow us on [X](https://twitter.com/ArizePhoenix).
- πΊοΈ Check out our [roadmap](https://github.com/orgs/Arize-ai/projects/45) to see where we're heading next.