base on Open-source observability for your LLM application, based on OpenTelemetry <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://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](https://github.com/open-telemetry/community/blob/1c71595874e5d125ca92ec3b0e948c4325161c8a/projects/llm-semconv.md) and help us shape the future of LLM observability.
Looking for the JS/TS version? Check out [OpenLLMetry-JS](https://github.com/traceloop/openllmetry-js).
OpenLLMetry is a set of extensions built on top of [OpenTelemetry](https://opentelemetry.io/) 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](https://www.traceloop.com/docs/openllmetry/integrations/introduction) - 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](https://traceloop.com/docs/openllmetry/getting-started-python).
Install the SDK:
```bash
pip install traceloop-sdk
```
Then, to start instrumenting your code, just add this line to your code:
```python
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:
```python
Traceloop.init(disable_batch=True)
```
## โซ Supported (and tested) destinations
- โ
[Traceloop](https://www.traceloop.com/docs/openllmetry/integrations/traceloop)
- โ
[Axiom](https://www.traceloop.com/docs/openllmetry/integrations/axiom)
- โ
[Azure Application Insights](https://www.traceloop.com/docs/openllmetry/integrations/azure)
- โ
[Braintrust](https://www.traceloop.com/docs/openllmetry/integrations/braintrust)
- โ
[Dash0](https://www.traceloop.com/docs/openllmetry/integrations/dash0)
- โ
[Datadog](https://www.traceloop.com/docs/openllmetry/integrations/datadog)
- โ
[Dynatrace](https://www.traceloop.com/docs/openllmetry/integrations/dynatrace)
- โ
[Google Cloud](https://www.traceloop.com/docs/openllmetry/integrations/gcp)
- โ
[Grafana](https://www.traceloop.com/docs/openllmetry/integrations/grafana)
- โ
[Highlight](https://www.traceloop.com/docs/openllmetry/integrations/highlight)
- โ
[Honeycomb](https://www.traceloop.com/docs/openllmetry/integrations/honeycomb)
- โ
[HyperDX](https://www.traceloop.com/docs/openllmetry/integrations/hyperdx)
- โ
[IBM Instana](https://www.traceloop.com/docs/openllmetry/integrations/instana)
- โ
[KloudMate](https://www.traceloop.com/docs/openllmetry/integrations/kloudmate)
- โ
[New Relic](https://www.traceloop.com/docs/openllmetry/integrations/newrelic)
- โ
[OpenTelemetry Collector](https://www.traceloop.com/docs/openllmetry/integrations/otel-collector)
- โ
[Service Now Cloud Observability](https://www.traceloop.com/docs/openllmetry/integrations/service-now)
- โ
[SigNoz](https://www.traceloop.com/docs/openllmetry/integrations/signoz)
- โ
[Sentry](https://www.traceloop.com/docs/openllmetry/integrations/sentry)
- โ
[Splunk](https://www.traceloop.com/docs/openllmetry/integrations/splunk)
See [our docs](https://traceloop.com/docs/openllmetry/integrations/exporting) for instructions on connecting to each one.
## ๐ช What do we instrument?
OpenLLMetry can instrument everything that [OpenTelemetry already instruments](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation) - 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.
- โ
[OpenAI / Azure OpenAI](https://openai.com/)
- โ
[Anthropic](https://www.anthropic.com/)
- โ
[Cohere](https://cohere.com/)
- โ
[Ollama](https://ollama.com/)
- โ
[Mistral AI](https://mistral.ai/)
- โ
[HuggingFace](https://huggingface.co/)
- โ
[Bedrock (AWS)](https://aws.amazon.com/bedrock/)
- โ
[SageMaker (AWS)](https://aws.amazon.com/sagemaker/)
- โ
[Replicate](https://replicate.com/)
- โ
[Vertex AI (GCP)](https://cloud.google.com/vertex-ai)
- โ
[Google Generative AI (Gemini)](https://ai.google/)
- โ
[IBM Watsonx AI](https://www.ibm.com/watsonx)
- โ
[Together AI](https://together.xyz/)
- โ
[Aleph Alpha](https://www.aleph-alpha.com/)
- โ
[Groq](https://groq.com/)
### Vector DBs
- โ
[Chroma](https://www.trychroma.com/)
- โ
[Pinecone](https://www.pinecone.io/)
- โ
[Qdrant](https://qdrant.tech/)
- โ
[Weaviate](https://weaviate.io/)
- โ
[Milvus](https://milvus.io/)
- โ
[Marqo](https://marqo.ai/)
- โ
[LanceDB](https://lancedb.com/)
### Frameworks
- โ
[LangChain](https://python.langchain.com/docs/introduction/)
- โ
[LlamaIndex](https://docs.llamaindex.ai/en/stable/module_guides/observability/observability.html#openllmetry)
- โ
[Haystack](https://haystack.deepset.ai/integrations/traceloop)
- โ
[LiteLLM](https://docs.litellm.ai/docs/observability/opentelemetry_integration)
## ๐ฑ Contributing
Whether big or small, we love contributions โค๏ธ Check out our guide to see how to [get started](https://traceloop.com/docs/openllmetry/contributing/overview).
Not sure where to get started? You can:
- [Book a free pairing session with one of our teammates](mailto:
[email protected]?subject=Pairing%20session&body=I'd%20like%20to%20do%20a%20pairing%20session!)!
- Join our <a href="https://traceloop.com/slack">Slack</a>, and ask us any questions there.
## ๐ Community & Support
- [Slack](https://traceloop.com/slack) (For live discussion with the community and the Traceloop team)
- [GitHub Discussions](https://github.com/traceloop/openllmetry/discussions) (For help with building and deeper conversations about features)
- [GitHub Issues](https://github.com/traceloop/openllmetry/issues) (For any bugs and errors you encounter using OpenLLMetry)
- [Twitter](https://twitter.com/traceloopdev) (Get news fast)
## ๐ Special Thanks
To @patrickdebois, who [suggested the great name](https://x.com/patrickdebois/status/1695518950715473991?s=46&t=zn2SOuJcSVq-Pe2Ysevzkg) 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>
", Assign "at most 3 tags" to the expected json: {"id":"8372","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"