Home

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> <p align="center"> <p align="center">Open-source observability for your LLM application</p> </p> <h4 align="center"> <a href="https://traceloop.com/docs/openllmetry/getting-started-python"><strong>Get started ยป</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://github.com/traceloop/openllmetry/releases"> <img src="https://img.shields.io/github/release/traceloop/openllmetry"> </a> <a href="https://pepy.tech/project/opentelemetry-instrumentation-openai"> <img src="https://static.pepy.tech/badge/opentelemetry-instrumentation-openai/month"> </a> <a href="https://github.com/traceloop/openllmetry/blob/main/LICENSE"> <img src="https://img.shields.io/badge/license-Apache 2.0-blue.svg" alt="OpenLLMetry is released under the Apache-2.0 License"> </a> <a href="https://github.com/traceloop/openllmetry/actions/workflows/ci.yml"> <img src="https://github.com/traceloop/openllmetry/actions/workflows/ci.yml/badge.svg"> </a> <a href="https://github.com/traceloop/openllmetry/issues"> <img src="https://img.shields.io/github/commit-activity/m/traceloop/openllmetry" alt="git commit activity" /> </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/blob/main/CONTRIBUTING.md"> <img src="https://img.shields.io/badge/PRs-Welcome-brightgreen" alt="PRs welcome!" /> </a> <a href="https://wiki.mutable.ai/traceloop/openllmetry"> <img src="https://img.shields.io/badge/Auto_Wiki-Mutable.ai-blue" /> </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.

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

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.

Vector DBs

Frameworks

๐ŸŒฑ 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:

๐Ÿ’š Community & Support

๐Ÿ™ Special Thanks

To @patrickdebois, who suggested the great name we're now using for this repo!

๐Ÿ’ซ Contributors

<a href="https://github.com/traceloop/openllmetry/graphs/contributors"> <img alt="contributors" src="https://contrib.rocks/image?repo=traceloop/openllmetry"/> </a>