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

0.27.0发布于 2026-05-29 13:06 UTC412star77fork同步于 2026-11-07 07:29 UTC

怎么上手

由 README 提炼,执行前请确认
npm install --save @traceloop/node-server-sdk
硬件要求按 README 说明

README 未说明

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

项目说明

由 README 自动翻译提炼

基于 OpenTelemetry 的 TypeScript LLM 应用可观测性 SDK,为 LLM 调用和向量库自动埋点

基于 OpenTelemetry 的 TypeScript LLM 应用可观测性工具,帮开发者追踪调用链、采集指标并监控模型运行状态。

核心能力

  • 基于 OpenTelemetry 输出标准 trace 数据
  • 自动埋点 OpenAI、Anthropic、Bedrock 等 LLM 提供商
  • 支持 Pinecone、Chroma、Qdrant 等向量库埋点
  • 可接入 Datadog、Honeycomb、Grafana Tempo 等后端
  • 提供 Traceloop SDK,两行代码即可初始化

容易踩的坑

必须在导入任何 LLM 模块之前先 import SDK,否则无法自动埋点;本地调试建议设置 disableBatch: true 才能立即看到 trace;还需自行选择并配置 trace 导出目标(如 Traceloop、Datadog 或 OTel Collector)

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

最近发版

5 个版本0.27.0
  1. 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

    • instrumentation-utils: Add missing modality field to block mappers document cases (#921) (ed41ff2)

    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
  2. 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

    • instrumentation-utils: Add missing modality field to block mappers document cases (#921) (ed41ff2)

    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:
  3. 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

    • instrumentation-utils: Add missing modality field to block mappers document cases (#921) (ed41ff2)

    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

  4. 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

    • instrumentation-utils: Add missing modality field to block mappers document cases (#921) (ed41ff2)

    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

    • eval: Add agent tool trajectory eval (#854) (1d1f642)
    • traceloop-sdk: Add csv and json support to experiment (#864) (114d2b8)
    • traceloop-sdk:
  5. 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

    • instrumentation-utils: Add missing modality field to block mappers document cases (#921) (ed41ff2)

    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

    • eval: Add agent tool trajectory eval (#854) (1d1f642)
    • traceloop-sdk: Add csv and json support to experiment (#864) (114d2b8)
    • traceloop-sdk: ai sdk transform response tool calls (#866) (3112d75)
    • traceloop-sdk: ai-sdk fixes (#865) ([c6655da](

用户点评

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

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

    README 原文

    未翻译

    🎉 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

    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:

    💚 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)