openinference

Arize-aiApache-2.0活跃维护

给 LLM 应用接入 OpenTelemetry 埋点,统一采集 OpenAI、LangChain、LlamaIndex 等框架的调用链路,方便做可观测和排障。

OpenTelemetry Instrumentation for AI Observability

python-openinference-instrumentation-openllmetry-v0.1.27发布于 2026-11-05 06:59 UTC1,314star +6 / 7 天382fork同步于 2026-11-10 17:51 UTC

怎么上手

由 README 提炼,执行前请确认
pip install openinference-instrumentation-openai
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 OpenTelemetry 的 AI 应用追踪规范与插件集,让 LLM 调用和检索链路可观测

给 LLM 应用接入 OpenTelemetry 埋点,统一采集 OpenAI、LangChain、LlamaIndex 等框架的调用链路,方便做可观测和排障。

核心能力

  • 提供 OpenInference 语义约定规范,描述 LLM 调用与上下文
  • 为 OpenAI、LangChain、LlamaIndex、Bedrock 等 SDK 提供自动埋点插件
  • 追踪向量库检索与外部工具调用等应用上下文
  • 兼容任意 OpenTelemetry 后端,原生支持 Arize Phoenix 与 AX
  • 规范与传输和文件格式无关,可与 JSON、ProtoBuf 配合

容易踩的坑

需按所用 SDK 单独安装对应的 openinference-instrumentation-* 包;需自行配置 OpenTelemetry 导出后端才能看到追踪数据;README 未给出具体版本兼容要求,安装前需核对 SDK 版本

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本python-openinference-instrumentation-openllmetry-v0.1.27
  1. python-openinference-instrumentation-google-adk-v1.1.2python-openinference-instrumentation-google-adk: v1.1.22026-11-05 · 2026-11-05 07:51 UTC
    查看更新说明

    1.1.2 (2026-11-05)

    Bug Fixes

    • google-adk: end agent_run and invocation spans safely when their generator is closed out of context (#4215) (eeee918)
  2. python-openinference-instrumentation-openllmetry-v0.1.27python-openinference-instrumentation-openllmetry: v0.1.27最新正式版2026-11-05 · 2026-11-05 06:59 UTC

    0.1.27 (2026-11-05)

    Bug Fixes

    • openllmetry: Set OK Status For Successful Spans (#4063) (f40fdc4)
  3. python-openinference-instrumentation-google-genai-v1.6.0python-openinference-instrumentation-google-genai: v1.6.02026-11-05 · 2026-11-05 06:59 UTC
    查看更新说明

    1.6.0 (2026-11-05)

    Features

    Bug Fixes

    • google_genai: publish AFC tool calls as output messages (#3798) (5878e0b)
  4. python-openinference-instrumentation-litellm-v0.1.54python-openinference-instrumentation-litellm: v0.1.542026-11-05 · 2026-11-05 06:59 UTC
    查看更新说明

    0.1.54 (2026-11-05)

    Bug Fixes

    • litellm: skip nested completion span for bridged responses calls (#4112) (0ad0efe)
  5. python-openinference-instrumentation-llama-index-v4.7.2python-openinference-instrumentation-llama-index: v4.7.22026-11-05 · 2026-11-05 06:59 UTC
    查看更新说明

    4.7.2 (2026-11-05)

    Bug Fixes

    • llama_index: Preserve Complete Gemini Token Usage (#4227) (d2738f8)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    OpenInference is a set of conventions and plugins that is complementary to OpenTelemetry to enable tracing of AI applications. OpenInference is natively supported by Arize Phoenix and Arize AX, 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. 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

    PackageDescriptionVersion
    openinference-semantic-conventionsSemantic conventions for tracing of LLM Apps.PyPI Version
    openinference-instrumentationReusable utilities, decorators, configurations, and helpers for instrumentation.PyPI Version
    openinference-instrumentation-agnoOpenInference Instrumentation for Agno Agents.PyPI Version
    openinference-instrumentation-ag2OpenInference Instrumentation for AG2.PyPI Version
    openinference-instrumentation-openaiOpenInference Instrumentation for OpenAI SDK.PyPI Version
    openinference-instrumentation-openai-agentsOpenInference Instrumentation for OpenAI Agents SDK.PyPI Version
    openinference-instrumentation-claude-agent-sdkOpenInference Instrumentation for Claude Agent SDK.PyPI Version
    openinference-instrumentation-llama-indexOpenInference Instrumentation for LlamaIndex.PyPI Version
    openinference-instrumentation-dspyOpenInference Instrumentation for DSPy.PyPI Version
    openinference-instrumentation-bedrockOpenInference Instrumentation for AWS Bedrock.PyPI Version
    openinference-instrumentation-langchainOpenInference Instrumentation for LangChain.PyPI Version
    openinference-instrumentation-mcpOpenInference Instrumentation for MCP.PyPI Version
    openinference-instrumentation-mistralaiOpenInference Instrumentation for MistralAI.PyPI Version
    openinference-instrumentation-portkeyOpenInference Instrumentation for Portkey.PyPI Version
    openinference-instrumentation-guardrailsOpenInference Instrumentation for Guardrails.PyPI Version
    openinference-instrumentation-vertexaiOpenInference Instrumentation for VertexAI.PyPI Version
    openinference-instrumentation-crewaiOpenInference Instrumentation for CrewAI.PyPI Version
    openinference-instrumentation-haystackOpenInference Instrumentation for Haystack.PyPI Version
    openinference-instrumentation-litellmOpenInference Instrumentation for liteLLM.PyPI Version
    openinference-instrumentation-groqOpenInference Instrumentation for Groq.PyPI Version
    openinference-instrumentation-instructorOpenInference Instrumentation for Instructor.PyPI Version
    openinference-instrumentation-anthropicOpenInference Instrumentation for Anthropic.PyPI Version
    openinference-instrumentation-beeaiOpenInference Instrumentation for BeeAI.PyPI Version
    openinference-instrumentation-google-genaiOpenInference Instrumentation for Google GenAI.PyPI Version
    openinference-instrumentation-google-adkOpenInference Instrumentation for Google ADK.PyPI Version
    openinference-instrumentation-autogen-agentchatOpenInference Instrumentation for Microsoft Autogen AgentChat.PyPI Version
    openinference-instrumentation-pydantic-aiOpenInference Instrumentation for PydanticAI.PyPI Version
    openinference-instrumentation-smolagentsOpenInference Instrumentation for smolagents.PyPI Version
    openinference-instrumentation-pipecatOpenInference Instrumentation for Pipecat.PyPI Version
    openinference-instrumentation-agentspecOpenInference Instrumentation for Open Agent Specification.PyPI Version
    openinference-instrumentation-strands-agentsOpenInference Instrumentation for Strands Agents.PyPI Version
    openinference-instrumentation-togetherOpenInference Instrumentation for Together AI.PyPI Version
    openinference-instrumentation-typesafeOpenInference Instrumentation for TypeSafe AI.PyPI Version
    openinference-instrumentation-ollamaOpenInference Instrumentation for Ollama.PyPI Version
    openinference-instrumentation-cohereOpenInference Instrumentation for Cohere.PyPI Version

    Span Processors

    Normalize and convert data across other instrumentation libraries by adding span processors that unify data.

    PackageDescriptionVersion
    openinference-instrumentation-openlitOpenInference Span Processor for OpenLIT traces.PyPI Version
    openinference-instrumentation-openllmetryOpenInference Span Processor for OpenLLMetry (Traceloop) traces.PyPI Version

    Examples

    NameDescriptionComplexity Level
    AgnoAgno agent examplesBeginner
    OpenAI SDKOpenAI Python SDK, including chat completions and embeddingsBeginner
    Claude Agent SDKClaude Agent SDKBeginner
    MistralAI SDKMistralAI Python SDKBeginner
    VertexAI SDKVertexAI Python SDKBeginner
    LlamaIndexLlamaIndex query enginesBeginner
    DSPyDSPy primitives and custom RAG modulesBeginner
    Boto3 Bedrock ClientBoto3 Bedrock clientBeginner
    LangChainLangChain primitives and simple chainsBeginner
    LiteLLMA lightweight LiteLLM frameworkBeginner
    LiteLLM ProxyLiteLLM Proxy to log OpenAI, Azure, Vertex, BedrockBeginner
    GroqGroq and AsyncGroq chat completionsBeginner
    Together AITogether and AsyncTogether chat completions, streaming, and tool callsBeginner
    TypeSafe AITypeSafeClient and AsyncTypeSafeClient System One calls (Noul, Choice, Score)Beginner
    AnthropicAnthropic Messages clientBeginner
    BeeAIAgentic instrumentation in the BeeAI frameworkBeginner
    HaystackA Haystack QA RAG applicationIntermediate
    OpenAI AgentsOpenAI Agents with handoffsIntermediate
    Autogen AgentChatMicrosoft Autogen Assistant Agent and Team ChatIntermediate
    AG2AG2 tool calling, group chats, and sequential chatsIntermediate
    PydanticAIPydanticAI agent examplesIntermediate
    PipecatPipecat application examplesIntermediate
    OllamaOllama chat, streaming, and tool callsBeginner
    CohereCohere ClientV2 chat completionsBeginner

    JavaScript

    Libraries

    PackageDescriptionVersion
    @arizeai/openinference-semantic-conventionsSemantic conventions for tracing of LLM Apps.NPM Version
    @arizeai/openinference-coreReusable utilities, configuration, and helpers for instrumentation.NPM Version
    @arizeai/openinference-instrumentation-bedrockOpenInference Instrumentation for AWS Bedrock.NPM Version
    @arizeai/openinference-instrumentation-bedrock-agent-runtimeOpenInference Instrumentation for AWS Bedrock Agent Runtime.NPM Version
    @arizeai/openinference-instrumentation-beeaiOpenInference Instrumentation for BeeAI.NPM Version
    @arizeai/openinference-instrumentation-langchainOpenInference Instrumentation for LangChain.js.NPM Version
    @arizeai/openinference-instrumentation-mcpOpenInference Instrumentation for MCP.NPM Version
    @arizeai/openinference-instrumentation-openaiOpenInference Instrumentation for OpenAI SDK.NPM Version
    @arizeai/openinference-instrumentation-anthropicOpenInference Instrumentation for the Anthropic SDK.NPM Version
    @arizeai/openinference-instrumentation-claude-agent-sdkOpenInference Instrumentation for Claude Agent SDK.NPM Version
    @arizeai/openinference-vercelOpenInference Support for Vercel AI SDK.NPM Version
    @arizeai/openinference-tanstack-aiOpenInference middleware for TanStack AI.NPM Version
    @arizeai/openinference-genaiOpenInference Support for GenAI conventionsNPM Version
    @arizeai/openinference-instrumentation-typesafeOpenInference Instrumentation for the TypeSafe AI SDK.NPM Version

    Examples

    NameDescriptionComplexity Level
    TypeSafe AIClassification, structured questions, and confidence-gated routing to an LLMBeginner

    Java

    Libraries

    PackageDescriptionVersion
    openinference-semantic-conventionsSemantic conventions for tracing of LLM Apps.Maven Central Version
    openinference-instrumentationBase instrumentation utilities.Maven Central Version
    openinference-instrumentation-langchain4jOpenInference Instrumentation for LangChain4j.Maven Central Version
    openinference-instrumentation-springAIOpenInference Instrumentation for Spring AI.Maven Central Version
    openinference-instrumentation-annotationAnnotation-based manual tracing with ByteBuddy.Maven Central Version
    openinference-instrumentation-adk-javaOpenInference Instrumentation for Google ADK Java (-javaagent).Maven Central Version

    Examples

    NameDescriptionComplexity Level
    LangChain4j ExampleSimple example using LangChain4j with OpenAIBeginner
    Spring AI ExampleSpring AI example with OpenAI and tool callingBeginner
    Annotation ExampleAnnotation-based tracing with @Chain, @LLM, @Tool, @AgentBeginner
    Programmatic ExampleManual tracing with typed span classes (LLMSpan, AgentSpan, etc.)Beginner
    ADK Java ExampleGoogle ADK for Java agent with a function tool, traced by the ADK -javaagentBeginner

    Go

    Libraries

    PackageDescriptionVersion
    openinference-semantic-conventionsSemantic conventions for tracing of LLM Apps.go get github.com/Arize-ai/openinference/go/openinference-semantic-conventions
    openinference-instrumentationSuppression, context attribute propagation, and TraceConfig masking. Honors OPENINFERENCE_HIDE_* env vars.go get github.com/Arize-ai/openinference/go/openinference-instrumentation
    openinference-instrumentation-anthropic-sdk-goOpenInference Instrumentation for the Anthropic Go SDK (anthropics/anthropic-sdk-go).go get github.com/Arize-ai/openinference/go/openinference-instrumentation-anthropic-sdk-go
    openinference-instrumentation-openai-goOpenInference Instrumentation for the official OpenAI Go SDK (openai/openai-go).go get github.com/Arize-ai/openinference/go/openinference-instrumentation-openai-go

    Requires Go 1.25+. Pair with arize-otel-go for the one-line OTLP/HTTP setup to Arize AX, or wire up any OTel exporter (e.g. Phoenix at http://localhost:6006/v1/traces).

    Supported Destinations

    OpenInference supports the following destinations as span collectors.

    Community

    Join our community to connect with thousands of machine learning practitioners and LLM observability enthusiasts!

    • 🌍 Join our Slack community.
    • 💡 Ask questions and provide feedback in the #phoenix-support channel.
    • 🌟 Leave a star on our GitHub.
    • 🐞 Report bugs with GitHub Issues.
    • 𝕏 Follow us on X.
    • 🗺️ Check out our roadmap to see where we're heading next.