# OpenLLMetry

> OpenTelemetry-based tracing for LLM apps that plugs into your existing observability stack

- Category: Evaluation & Production Ops / Observability & LLMOps
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/traceloop/openllmetry
- Website: https://www.traceloop.com/openllmetry
- Canonical page: https://ai-tldr.dev/tools/openllmetry/

## In short

OpenLLMetry is a set of extensions built on top of OpenTelemetry that gives you observability over an LLM application. It ships standard OpenTelemetry instrumentations for LLM providers and vector databases, plus a Traceloop SDK that makes setup a one-liner. It sits in the Observability & LLMOps category of the Evaluation & Production Ops tools and is open-source, written in Python and licensed Apache-2.0.

## Overview

OpenLLMetry is a set of extensions built on top of OpenTelemetry that gives you observability over an LLM application. It ships standard OpenTelemetry instrumentations for LLM providers and vector databases, plus a Traceloop SDK that makes setup a one-liner. It is built and maintained by Traceloop under the Apache 2.0 license.

Because it uses OpenTelemetry under the hood, the traces it produces are standard OpenTelemetry data, so you can connect them to observability backends you already run, such as Datadog, Honeycomb, Grafana, New Relic, and many others. If you already have OpenTelemetry instrumented, you can add any of its instrumentations directly without the SDK.

It fits the LLM observability and tracing space: instead of a separate, proprietary dashboard, it routes LLM calls, vector DB queries, and framework activity into the same tracing system you use for the rest of your services. A JS/TS version is available separately as OpenLLMetry-JS.

## What it does

- Auto-instruments LLM providers including OpenAI/Azure OpenAI, Anthropic, Bedrock, Cohere, Google Gemini, Mistral, Groq, Ollama, and more
- Instruments vector databases such as Chroma, Pinecone, Qdrant, and Weaviate
- Built on OpenTelemetry, so traces export to existing backends like Datadog, Honeycomb, Grafana, New Relic, SigNoz, and Sentry
- Traceloop SDK gets you tracing with a single Traceloop.init() call
- Works alongside standard OpenTelemetry instrumentations for your DB, API calls, and other services
- Apache 2.0 licensed; a separate OpenLLMetry-JS package covers JavaScript and TypeScript

## Getting started

The easiest way to start is the Traceloop SDK, which wraps the OpenTelemetry instrumentations for you.

1. Install the SDK

   Install the Traceloop SDK from PyPI.

```bash
pip install traceloop-sdk
```

2. Initialize tracing

   Add one line near the start of your app to begin tracing your LLM calls with OpenLLMetry.

```python
from traceloop.sdk import Traceloop

Traceloop.init()
```

3. See traces locally

   When running locally, disable batch sending so traces appear immediately instead of being buffered.

```python
Traceloop.init(disable_batch=True)
```

## When to use it

- Trace OpenAI or Anthropic calls in a production LLM app and send the spans to your existing Datadog or Honeycomb setup
- Debug a RAG pipeline by capturing both the LLM calls and the vector DB queries (Chroma, Pinecone, Qdrant, Weaviate) in one trace
- Add LLM observability to a service that already uses OpenTelemetry by dropping in the relevant instrumentations directly
- Inspect traces locally during development with batch sending disabled to iterate on prompt and retrieval behavior
