explaingit

traceloop/openllmetry

7,100PythonAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

An open-source library that automatically records every prompt, response, and timing from your LLM calls in two lines of Python, then sends that data to any monitoring tool you already use.

Mindmap

mindmap
  root((openllmetry))
    What it does
      Traces LLM calls
      Auto-instruments apps
      OpenTelemetry standard
    Tech Stack
      Python
      OpenTelemetry
      TypeScript
    Providers
      OpenAI Anthropic Groq
      Mistral Cohere Bedrock
      Vector databases
    Use Cases
      Debug AI failures
      Monitor latency
      Route to dashboards
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add full visibility into every OpenAI or Anthropic call your app makes without manually logging anything.

USE CASE 2

Route LLM trace data into Datadog, Grafana, or Honeycomb alongside your existing application metrics.

USE CASE 3

Debug a slow AI feature by seeing exactly how long each model call takes and what input and output it received.

USE CASE 4

Monitor a multi-step agent that calls several LLM providers to find where it fails or exceeds latency budgets.

Tech stack

PythonOpenTelemetryTypeScript

Getting it running

Difficulty · moderate Time to first run · 30min

Requires an existing observability backend (Datadog, Grafana, etc.) and an LLM provider API key.

Free to use for any purpose including commercial, you must keep the copyright and license notice when distributing.

In plain English

OpenLLMetry is an open-source library for monitoring and tracing AI applications that use large language models. When you build something with an LLM provider like OpenAI or Anthropic, it can be hard to see what is happening inside: which prompts went out, what the model returned, how long it took, and where failures occurred. OpenLLMetry adds that visibility by automatically recording those interactions as structured trace data. It is built on top of OpenTelemetry, an industry-standard format for collecting observability data. Because it uses that standard, the traces it produces can be sent directly to monitoring platforms you may already use, including Datadog, Honeycomb, Grafana, New Relic, Splunk, and over twenty others. If you have OpenTelemetry set up in your application already, you can add OpenLLMetry's instrumentations to it without replacing anything. Setup is minimal. You install the SDK via pip, add two lines of Python code to your application, and tracing begins. The library then automatically captures calls to supported LLM providers, vector databases, and AI frameworks without requiring you to manually wrap each function call. The list of supported providers is broad: OpenAI, Anthropic, Google Gemini, Groq, Mistral, Cohere, Ollama, AWS Bedrock and SageMaker, Hugging Face, and others. On the vector database side, it covers Chroma, Pinecone, Qdrant, Weaviate, Milvus, and a few more. It also instruments popular agent and orchestration frameworks. A JavaScript and TypeScript version of the library is maintained in a separate repository. The project is built by Traceloop, a Y Combinator-backed company, and released under the Apache 2.0 license. The semantic conventions it defines for LLM tracing have been proposed as part of the broader OpenTelemetry standard.

Copy-paste prompts

Prompt 1
I'm building a chatbot with OpenAI in Python. How do I add OpenLLMetry to trace every prompt and response and send it to Datadog?
Prompt 2
My app uses both Anthropic and Pinecone. How do I set up OpenLLMetry to instrument both and view the traces in one place?
Prompt 3
I already have OpenTelemetry set up in my Python app. How do I add OpenLLMetry on top without replacing my existing tracing config?
Prompt 4
How do I create a Grafana dashboard showing my LLM call latency, token usage, and error rate using OpenLLMetry traces?
Prompt 5
Show me the minimum code to get OpenLLMetry tracing working for a Groq API call in Python.
Open on GitHub → Explain another repo

← traceloop on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.