traceloop / openllmetry
Open-source observability for your GenAI or LLM application, based on OpenTelemetry
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing traceloop/openllmetry in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Summary (README)
Preview๐ 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
- โ Traceloop
- โ Axiom
- โ Azure Application Insights
- โ Braintrust
- โ Dash0
- โ Datadog
- โ Dynatrace
- โ Google Cloud
- โ Grafana
- โ Highlight
- โ Honeycomb
- โ HyperDX
- โ IBM Instana
- โ KloudMate
- โ Laminar
- โ New Relic
- โ OpenTelemetry Collector
- โ Oracle Cloud
- โ Scorecard
- โ Service Now Cloud Observability
- โ SigNoz
- โ Sentry
- โ Splunk
- โ Tencent Cloud
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.
- โ Aleph Alpha
- โ Anthropic
- โ Bedrock (AWS)
- โ Cohere
- โ Google Generative AI (Gemini)
- โ Groq
- โ HuggingFace
- โ IBM Watsonx AI
- โ Mistral AI
- โ Ollama
- โ OpenAI / Azure OpenAI
- โ Replicate
- โ SageMaker (AWS)
- โ Together AI
- โ Vertex AI (GCP)
- โ WRITER
Vector DBs
Frameworks
- โ Agno
- โ AWS Strands (built-in OTEL support)
- โ CrewAI
- โ Haystack
- โ LangChain
- โ Langflow
- โ LangGraph
- โ LiteLLM
- โ LlamaIndex
- โ OpenAI Agents
Protocol
- โ MCP
๐ Telemetry
We no longer log or collect any telemetry in the SDK or in the instrumentations. Make sure to bump to v0.49.2 and above.
Why we collect telemetry
- The primary purpose is to detect exceptions within instrumentations. Since LLM providers frequently update their APIs, this helps us quickly identify and fix any breaking changes.
- We only collect anonymous data, with no personally identifiable information. You can view exactly what data we collect in our Privacy documentation.
- Telemetry is only collected in the SDK. If you use the instrumentations directly without the SDK, no telemetry is collected.
๐ฑ 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:
- 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)
๐ Special Thanks
To @patrickdebois, who suggested the great name we're now using for this repo!