Awesome
<p align="center"> <a href="https://www.traceloop.com/openllmetry#gh-light-mode-only"> <img width="600" src="https://raw.githubusercontent.com/traceloop/openllmetry/main/img/logo-light.png"> </a> <a href="https://www.traceloop.com/openllmetry#gh-dark-mode-only"> <img width="600" src="https://raw.githubusercontent.com/traceloop/openllmetry/main/img/logo-dark.png"> </a> </p> <h1 align="center">For Javascript / Typescript</h1> <p align="center"> <p align="center">Open-source observability for your LLM application</p> </p> <h4 align="center"> Get started with <a href="https://traceloop.com/docs/openllmetry/getting-started-ts"><strong>Node.js </strong></a> or <a href="https://traceloop.com/docs/openllmetry/getting-started-nextjs"><strong>Next.js</strong></a> ยป <br /> <br /> <a href="https://traceloop.com/slack">Slack</a> | <a href="https://traceloop.com/docs/openllmetry/introduction">Docs</a> | <a href="https://www.traceloop.com/openllmetry">Website</a> </h4> <h4 align="center"> <a href="https://www.npmjs.com/package/@traceloop/node-server-sdk"> <img src="https://badge.fury.io/js/@traceloop%2Fnode-server-sdk.svg"> </a> <a href="https://github.com/traceloop/openllmetry-js/blob/main/LICENSE"> <img src="https://img.shields.io/badge/license-Apache 2.0-blue.svg" alt="OpenLLMetry JS is released under the Apache-2.0 License"> </a> <a href="https://github.com/traceloop/openllmetry-js/actions/workflows/ci.yml"> <img src="https://github.com/traceloop/openllmetry-js/actions/workflows/ci.yml/badge.svg"> </a> <a href="https://www.ycombinator.com/companies/traceloop"><img src="https://img.shields.io/website?color=%23f26522&down_message=Y%20Combinator&label=Backed&logo=ycombinator&style=flat-square&up_message=Y%20Combinator&url=https%3A%2F%2Fwww.ycombinator.com"></a> <a href="https://github.com/traceloop/openllmetry-js/blob/main/CONTRIBUTING.md"> <img src="https://img.shields.io/badge/PRs-Welcome-brightgreen" alt="PRs welcome!" /> </a> <a href="https://github.com/traceloop/openllmetry-js/issues"> <img src="https://img.shields.io/github/commit-activity/m/traceloop/openllmetry-js" alt="git commit activity" /> </a> <a href="https://traceloop.com/slack"> <img src="https://img.shields.io/badge/chat-on%20Slack-blueviolet" alt="Slack community channel" /> </a> <a href="https://twitter.com/traceloopdev"> <img src="https://img.shields.io/badge/follow-%40traceloopdev-1DA1F2?logo=twitter&style=social" alt="Traceloop Twitter" /> </a> </h4>๐ 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
๐ฑ 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 <a href="https://traceloop.com/slack">Slack</a>, 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)