必须在导入任何 LLM 模块之前先 import SDK,否则无法自动埋点;本地调试建议设置 disableBatch: true 才能立即看到 trace;还需自行选择并配置 trace 导出目标(如 Traceloop、Datadog 或 OTel Collector)
openllmetry-js
traceloopApache-2.0更新放缓基于 OpenTelemetry 的 TypeScript LLM 应用可观测性工具,帮开发者追踪调用链、采集指标并监控模型运行状态。
Sister project to OpenLLMetry, but in Typescript. Open-source observability for your LLM application, based on OpenTelemetry
npm install --save @traceloop/node-server-sdkREADME 未说明
基于 OpenTelemetry 的 TypeScript LLM 应用可观测性 SDK,为 LLM 调用和向量库自动埋点
基于 OpenTelemetry 的 TypeScript LLM 应用可观测性工具,帮开发者追踪调用链、采集指标并监控模型运行状态。
核心能力
- 基于 OpenTelemetry 输出标准 trace 数据
- 自动埋点 OpenAI、Anthropic、Bedrock 等 LLM 提供商
- 支持 Pinecone、Chroma、Qdrant 等向量库埋点
- 可接入 Datadog、Honeycomb、Grafana Tempo 等后端
- 提供 Traceloop SDK,两行代码即可初始化
容易踩的坑
- 0.27.0最新正式版2026-05-29 · 2026-05-29 13:06 UTC
Change Log
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.27.0 (2026-05-29)
Bug Fixes
Features
0.26.0 (2026-04-16)
Features
- instrumentation-google-generativeai: add OTel 1.40 GenAI semantic conventions instrumentation (#931) (877fc42)
0.25.0 (2026-04-13)
Features
- ai-sdk: migrate ai-sdk to opentelemtry 1.40 semantic conventions (#924) (4e3ffd5)
- instrumentation-llamaindex: migrate to OTel 1.40 GenAI semantic conventions (#925) (4c8becd)
0.24.1 (2026-04-12)
Bug Fixes
0.24.0 (2026-04-06)
Bug Fixes
Features
- instrumentation-bedrock: align GenAI semconv with OTel 1.40 and migrate Bedrock instrumentation (#917) (4b5d28f)
- instrumentation-langchain: Migrate langchain semantic conventions to 1.40 (#920) (999bd70)
0.23.0 (2026-03-30)
Features
- ai-semantic-conventions, instrumentation-anthropic: align GenAI semconv with OTel 1.40 and migrate Anthropic instrumentation (#896) (643425a)
- evaluators: add standalone evaluator create/list/get/update/run SDK methods (#908) (dd89e8d)
- instrumentation-openai: Migrate OpenAI instrumentation to OTel 1.40 semantic conventions (#909) (26a0d01)
- sdk: add synonym field mapping for experiment evaluator inputs (#895) ([50a591c](https://g
- 0.26.02026-04-16 · 2026-04-16 11:43 UTC
查看更新说明
Change Log
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.26.0 (2026-04-16)
Features
- instrumentation-google-generativeai: add OTel 1.40 GenAI semantic conventions instrumentation (#931) (877fc42)
0.25.0 (2026-04-13)
Features
- ai-sdk: migrate ai-sdk to opentelemtry 1.40 semantic conventions (#924) (4e3ffd5)
- instrumentation-llamaindex: migrate to OTel 1.40 GenAI semantic conventions (#925) (4c8becd)
0.24.1 (2026-04-12)
Bug Fixes
0.24.0 (2026-04-06)
Bug Fixes
Features
- instrumentation-bedrock: align GenAI semconv with OTel 1.40 and migrate Bedrock instrumentation (#917) (4b5d28f)
- instrumentation-langchain: Migrate langchain semantic conventions to 1.40 (#920) (999bd70)
0.23.0 (2026-03-30)
Features
- ai-semantic-conventions, instrumentation-anthropic: align GenAI semconv with OTel 1.40 and migrate Anthropic instrumentation (#896) (643425a)
- evaluators: add standalone evaluator create/list/get/update/run SDK methods (#908) (dd89e8d)
- instrumentation-openai: Migrate OpenAI instrumentation to OTel 1.40 semantic conventions (#909) (26a0d01)
- sdk: add synonym field mapping for experiment evaluator inputs (#895) (50a591c)
0.22.8 (2026-03-04)
Bug Fixes
0.22.7 (2026-02-08)
Bug Fixes
- *traceloop-sdk:
- 0.25.02026-04-13 · 2026-04-13 05:57 UTC
查看更新说明
Change Log
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.25.0 (2026-04-13)
Features
- ai-sdk: migrate ai-sdk to opentelemtry 1.40 semantic conventions (#924) (4e3ffd5)
- instrumentation-llamaindex: migrate to OTel 1.40 GenAI semantic conventions (#925) (4c8becd)
0.24.1 (2026-04-12)
Bug Fixes
0.24.0 (2026-04-06)
Bug Fixes
Features
- instrumentation-bedrock: align GenAI semconv with OTel 1.40 and migrate Bedrock instrumentation (#917) (4b5d28f)
- instrumentation-langchain: Migrate langchain semantic conventions to 1.40 (#920) (999bd70)
0.23.0 (2026-03-30)
Features
- ai-semantic-conventions, instrumentation-anthropic: align GenAI semconv with OTel 1.40 and migrate Anthropic instrumentation (#896) (643425a)
- evaluators: add standalone evaluator create/list/get/update/run SDK methods (#908) (dd89e8d)
- instrumentation-openai: Migrate OpenAI instrumentation to OTel 1.40 semantic conventions (#909) (26a0d01)
- sdk: add synonym field mapping for experiment evaluator inputs (#895) (50a591c)
0.22.8 (2026-03-04)
Bug Fixes
0.22.7 (2026-02-08)
Bug Fixes
- traceloop-sdk: Add conversation decorator (#883) (75cf2fe)
- tracing: Add association property (#852) ([7a42933](https://github.com/traceloop/openllmetry-js/commit/7a4293341a5071c
- 0.24.12026-04-12 · 2026-04-12 08:14 UTC
查看更新说明
Change Log
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.24.1 (2026-04-12)
Bug Fixes
0.24.0 (2026-04-06)
Bug Fixes
Features
- instrumentation-bedrock: align GenAI semconv with OTel 1.40 and migrate Bedrock instrumentation (#917) (4b5d28f)
- instrumentation-langchain: Migrate langchain semantic conventions to 1.40 (#920) (999bd70)
0.23.0 (2026-03-30)
Features
- ai-semantic-conventions, instrumentation-anthropic: align GenAI semconv with OTel 1.40 and migrate Anthropic instrumentation (#896) (643425a)
- evaluators: add standalone evaluator create/list/get/update/run SDK methods (#908) (dd89e8d)
- instrumentation-openai: Migrate OpenAI instrumentation to OTel 1.40 semantic conventions (#909) (26a0d01)
- sdk: add synonym field mapping for experiment evaluator inputs (#895) (50a591c)
0.22.8 (2026-03-04)
Bug Fixes
0.22.7 (2026-02-08)
Bug Fixes
- traceloop-sdk: Add conversation decorator (#883) (75cf2fe)
- tracing: Add association property (#852) (7a42933)
0.22.6 (2026-01-18)
Bug Fixes
- 0.24.02026-04-06 · 2026-04-06 12:05 UTC
查看更新说明
Change Log
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.24.0 (2026-04-06)
Bug Fixes
Features
- instrumentation-bedrock: align GenAI semconv with OTel 1.40 and migrate Bedrock instrumentation (#917) (4b5d28f)
- instrumentation-langchain: Migrate langchain semantic conventions to 1.40 (#920) (999bd70)
0.23.0 (2026-03-30)
Features
- ai-semantic-conventions, instrumentation-anthropic: align GenAI semconv with OTel 1.40 and migrate Anthropic instrumentation (#896) (643425a)
- evaluators: add standalone evaluator create/list/get/update/run SDK methods (#908) (dd89e8d)
- instrumentation-openai: Migrate OpenAI instrumentation to OTel 1.40 semantic conventions (#909) (26a0d01)
- sdk: add synonym field mapping for experiment evaluator inputs (#895) (50a591c)
0.22.8 (2026-03-04)
Bug Fixes
0.22.7 (2026-02-08)
Bug Fixes
- traceloop-sdk: Add conversation decorator (#883) (75cf2fe)
- tracing: Add association property (#852) (7a42933)
0.22.6 (2026-01-18)
Bug Fixes
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
🎉 New: Our semantic conventions are now part of OpenTelemetry! Join the discussion and help us shape the future of LLM observability.
OpenLLMetry-JS 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-JS, 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:
npm install --save @traceloop/node-server-sdk
Then, to start instrumenting your code, just add these 2 lines to your code:
import * as traceloop from "@traceloop/node-server-sdk";
traceloop.initialize();
Make sure to import the SDK before importing any LLM module.
That's it. You're now tracing your code with OpenLLMetry-JS! If you're running this locally, you may want to disable batch sending, so you can see the traces immediately:
traceloop.initialize({ disableBatch: true });
Now, you need to decide where to export the traces to.
⏫ Supported (and tested) destinations
- ✅ Traceloop
- ✅ Dynatrace
- ✅ Datadog
- ✅ New Relic
- ✅ Honeycomb
- ✅ Grafana Tempo
- ✅ HyperDX
- ✅ SigNoz
- ✅ Splunk
- ✅ OpenTelemetry Collector
See our docs for instructions on connecting to each one.
🪗 What do we instrument?
OpenLLMetry-JS 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 Pinecone, Chroma, or Weaviate.
LLM Providers
- ✅ OpenAI
- ✅ Azure OpenAI
- ✅ Anthropic
- ✅ Cohere
- ⏳ Replicate
- ⏳ HuggingFace
- ✅ Vertex AI (GCP)
- ✅ Bedrock (AWS)
Vector DBs
- ✅ Pinecone
- ✅ Chroma
- ✅ Qdrant
- ⏳ Weaviate
- ⏳ Milvus
Frameworks
- ✅ LangChain
- ✅ LlamaIndex
🔎 Telemetry
We no longer log or collect any telemetry in the SDK or in the instrumentations. Make sure to bump to v0.21.1 and above.
🌱 Contributing
Whether it's 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)