本地调试需设置 disable_batch=True 才能立即看到 trace;SDK 与插桩需升级到 v0.49.2 及以上才不再采集遥测;需自行配置导出目标(如 Datadog、Honeycomb、OTel Collector)才能收到数据
openllmetry
traceloopApache-2.0活跃维护基于 OpenTelemetry 的 LLM 应用可观测性工具,能追踪调用链、采集指标并监控模型表现,帮你在生产环境定位 GenAI 应用的性能与质量问题。
Open-source observability for your GenAI or LLM application, based on OpenTelemetry
pip install traceloop-sdk
from traceloop.sdk import Traceloop
Traceloop.init()README 未说明
基于 OpenTelemetry 的 LLM 应用可观测性工具集,为你的 GenAI 应用提供完整追踪
基于 OpenTelemetry 的 LLM 应用可观测性工具,能追踪调用链、采集指标并监控模型表现,帮你在生产环境定位 GenAI 应用的性能与质量问题。
核心能力
- 基于 OpenTelemetry 扩展,可接入现有可观测性后端
- 提供 LLM 提供商与向量数据库的标准 OTel 插桩
- 覆盖 OpenAI、Anthropic、Bedrock 等主流模型服务
- 支持 LangChain、LlamaIndex、CrewAI 等框架追踪
- 提供 Traceloop SDK 一行代码完成初始化
容易踩的坑
- 0.63.0最新正式版2026-11-05 · 2026-11-05 10:08 UTC
v0.63.0 (2026-11-05)
Feat
- sdk: add trace_content parameter to Traceloop.init() (#4565)
Fix
- mcp: don't let a tracing failure in send_request return None (#4672)
- mcp: nested async with Client leaks the session span context (#4622)
- mcp: stop @dont_throw from swallowing wrapped-call exceptions (#4589)
- vertexai: count thinking tokens in gen_ai.usage.output_tokens (#4613)
- google-generativeai: count thinking tokens in gen_ai.usage.output_tokens (#4603)
- bedrock: trace invoke_model* calls whose body is a file-like object (#4602)
- openai: preserve non-ASCII characters in JSON span attributes (#4566)
- google-generativeai: correct version to match released package version (#4573)
- crewai: correct version to match released package version (#4571)
- sdk: declare requests and httpx as runtime dependencies (#4543)
- openai: remove completed responses from the global responses dict (#4531)
[main e3d651a0c] bump: version 0.62.4 → 0.63.0 68 files changed, 87 insertions(+), 67 deletions(-)
- 0.62.42026-09-29 · 2026-09-29 10:41 UTC
查看更新说明
v0.62.4 (2026-09-29)
Fix
- groq: record token usage and duration metrics for streaming responses (#4439)
- mcp: end the session span when Client.aexit is cancelled (#4517)
- mcp: honor TRACELOOP_TRACE_CONTENT on the client path (#4466)
- openai: don't crash tracing responses.with_raw_response.create(stream=True) (#4477)
- mistralai: record chunked assistant content instead of dropping it (#4478)
- langchain: keep objects out of association properties (#4467)
- crewai: stop the dict walk leaking credentials onto spans (#4465)
[main be498301c] bump: version 0.62.3 → 0.62.4 66 files changed, 77 insertions(+), 65 deletions(-)
- 0.62.32026-08-10 · 2026-08-10 08:49 UTC
查看更新说明
v0.62.3 (2026-08-10)
Fix
- litellm: register instrumentation in commitizen version files (#4408)
[main 62e24c2ff] bump: version 0.62.2 → 0.62.3 66 files changed, 71 insertions(+), 65 deletions(-)
- 0.62.22026-08-09 · 2026-08-09 10:06 UTC
查看更新说明
v0.62.2 (2026-08-09)
Fix
- sdk,openai-agents: stop entity names leaking onto sibling and parent spans (#4405)
[main c2f3f45e2] bump: version 0.62.1 → 0.62.2 64 files changed, 69 insertions(+), 63 deletions(-)
- 0.62.12026-06-28 · 2026-06-28 12:09 UTC
查看更新说明
v0.62.1 (2026-06-28)
Fix
- bump version problem (#4332)
[main 93429cfb9] bump: version 0.62.0 → 0.62.1 64 files changed, 69 insertions(+), 63 deletions(-)
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
🎉 New: Our semantic conventions are now part of OpenTelemetry! Join the discussion and help us shape the future of LLM observability.
Looking for the JS/TS version? Check out OpenLLMetry-JS.
OpenLLMetry is a set of extensions built on top of OpenTelemetry that gives you complete observability over your LLM application. Because it uses OpenTelemetry under the hood, it can be connected to your existing observability solutions - Datadog, Honeycomb, and others.
It's built and maintained by Traceloop under the Apache 2.0 license.
The repo contains standard OpenTelemetry instrumentations for LLM providers and Vector DBs, as well as a Traceloop SDK that makes it easy to get started with OpenLLMetry, while still outputting standard OpenTelemetry data that can be connected to your observability stack. If you already have OpenTelemetry instrumented, you can just add any of our instrumentations directly.
🚀 Getting Started
The easiest way to get started is to use our SDK. For a complete guide, go to our docs.
Install the SDK:
pip install traceloop-sdk
Then, to start instrumenting your code, just add this line to your code:
from traceloop.sdk import Traceloop
Traceloop.init()
That's it. You're now tracing your code with OpenLLMetry! If you're running this locally, you may want to disable batch sending, so you can see the traces immediately:
Traceloop.init(disable_batch=True)
⏫ Supported (and tested) destinations
- ✅ Traceloop
- ✅ Axiom
- ✅ Azure Application Insights
- ✅ Braintrust
- ✅ Dash0
- ✅ Datadog
- ✅ Dynatrace
- ✅ Google Cloud
- ✅ Grafana
- ✅ Highlight
- ✅ Honeycomb
- ✅ HyperDX
- ✅ IBM Instana
- ✅ KloudMate
- ✅ Laminar
- ✅ New Relic
- ✅ OpenTelemetry Collector
- ✅ Oracle Cloud
- ✅ Scorecard
- ✅ Service Now Cloud Observability
- ✅ SigNoz
- ✅ Sentry
- ✅ Splunk
- ✅ Tencent Cloud
See our docs for instructions on connecting to each one.
🪗 What do we instrument?
OpenLLMetry can instrument everything that OpenTelemetry already instruments - so things like your DB, API calls, and more. On top of that, we built a set of custom extensions that instrument things like your calls to OpenAI or Anthropic, or your Vector DB like Chroma, Pinecone, Qdrant or Weaviate.
- ✅ Aleph Alpha
- ✅ Anthropic
- ✅ Bedrock (AWS)
- ✅ Cohere
- ✅ Google Generative AI (Gemini)
- ✅ Groq
- ✅ HuggingFace
- ✅ IBM Watsonx AI
- ✅ Mistral AI
- ✅ Ollama
- ✅ OpenAI / Azure OpenAI
- ✅ Replicate
- ✅ SageMaker (AWS)
- ✅ Together AI
- ✅ Vertex AI (GCP)
- ✅ WRITER
Vector DBs
Frameworks
- ✅ Agno
- ✅ AWS Strands (built-in OTEL support)
- ✅ CrewAI
- ✅ Haystack
- ✅ LangChain
- ✅ Langflow
- ✅ LangGraph
- ✅ LiteLLM
- ✅ LlamaIndex
- ✅ OpenAI Agents
Protocol
- ✅ MCP
🔎 Telemetry
We no longer log or collect any telemetry in the SDK or in the instrumentations. Make sure to bump to v0.49.2 and above.
Why we collect telemetry
- The primary purpose is to detect exceptions within instrumentations. Since LLM providers frequently update their APIs, this helps us quickly identify and fix any breaking changes.
- We only collect anonymous data, with no personally identifiable information. You can view exactly what data we collect in our Privacy documentation.
- Telemetry is only collected in the SDK. If you use the instrumentations directly without the SDK, no telemetry is collected.
🌱 Contributing
Whether big or small, we love contributions ❤️ Check out our guide to see how to get started.
Not sure where to get started? You can:
- Book a free pairing session with one of our teammates!
- Join our Slack, and ask us any questions there.
💚 Community & Support
- Slack (For live discussion with the community and the Traceloop team)
- GitHub Discussions (For help with building and deeper conversations about features)
- GitHub Issues (For any bugs and errors you encounter using OpenLLMetry)
- Twitter (Get news fast)
🙏 Special Thanks
To @patrickdebois, who suggested the great name we're now using for this repo!