What is Langtrace?
Langtrace is an open source observability tool for applications that call LLM APIs, vector databases, and LLM frameworks. You add its SDK to your code, and it captures traces and metrics that let you debug and analyze what your application is doing at runtime. It sits in the Observability & LLMOps category of the Evaluation & Production Ops tools and is open-source, written in TypeScript and licensed Apache-2.0.
Overview
Langtrace is an open source observability tool for applications that call LLM APIs, vector databases, and LLM frameworks. You add its SDK to your code, and it captures traces and metrics that let you debug and analyze what your application is doing at runtime.
It is built for developers building LLM-powered apps who need to see latency, cost, and usage patterns instead of guessing. The traces follow OpenTelemetry (OTEL) standards, so the data fits into tooling you may already use.
As an LLM observability tool, Langtrace sits between your app and the model or database providers. It automatically captures traces from many vendors and frameworks, and you can run it as a managed cloud service or self-host the whole stack on your own infrastructure.
What it does
- Built on OpenTelemetry (OTEL) standards for consistent, portable tracing
- Real-time monitoring of LLM API calls, vector database operations, and framework usage
- Performance insights into latency, cost, and usage patterns
- Automatic trace capture for many LLM providers, frameworks, and vector databases (OpenAI, Anthropic, Langchain, LlamaIndex, Pinecone, ChromaDB, and more)
- TypeScript/JavaScript and Python SDKs
- Self-hosting option via Docker Compose, with no telemetry leaving your servers
Getting started
Install the SDK for your language, then initialize Langtrace before importing any LLM modules. You can use the managed cloud or self-host the stack.
Install the SDK
Install the Langtrace SDK for TypeScript/JavaScript or Python.
# TypeScript/JavaScript
npm i @langtrase/typescript-sdk
# Python
pip install langtrace-python-sdkInitialize in TypeScript
Import and initialize Langtrace before any LLM module imports. Pass your API key, or set LANGTRACE_API_KEY as an environment variable and call init() with no arguments.
import * as Langtrace from '@langtrase/typescript-sdk' // Must precede any llm module imports
Langtrace.init({ api_key: '<your_api_key>' })Initialize in Python
Import langtrace and call init() with your API key, or set LANGTRACE_API_KEY in the environment and call init() with no arguments.
from langtrace_python_sdk import langtrace
langtrace.init(api_key='<your_api_key>')Self-host with Docker (optional)
To run Langtrace locally you need the Next.js app, a Postgres database, and a Clickhouse database. With Docker and Docker Compose installed, start the stack and open http://localhost:3000.
docker compose upCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Debugging an LLM application by tracing each step of a workflow to see where it slows down or fails
- Tracking the cost and latency of LLM API calls across providers like OpenAI, Anthropic, and Gemini
- Monitoring vector database operations (Pinecone, ChromaDB, Weaviate) alongside model calls in one trace
- Self-hosting observability for LLM apps where data must stay on your own infrastructure
How Langtrace compares
Langtrace alongside other open-source observability & llmops tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Langfuse | ★ 38k | A self-hostable platform for tracing LLM and agent calls, managing prompts, and running evaluations to debug and improve AI applications. |
| Opik | ★ 23.5k | An open-source platform from Comet for tracing, evaluating, and monitoring LLM applications, RAG systems, and agent workflows with dashboards and LLM-as-judge metrics. |
| RagaAI Catalyst | ★ 16.2k | Python SDK that combines agentic tracing, metric evaluation, dataset and prompt management, guardrails and red-teaming for LLM and multi-agent applications. |
| CodeBurn | ★ 11.9k | Reads the session files 41 AI coding tools already write to disk and breaks token spend down by model, project and task — no API keys or proxy — then flags waste and correlates spend with git commits. |
| TensorZero | ★ 11.7k | An open-source LLMOps platform that puts a single gateway in front of every major LLM provider and adds observability, evaluation, optimization, and A/B testing. |
| Evidently | ★ 8.1k | A monitoring and evaluation framework for ML and LLM systems that tracks output quality, drift, and test results over time with reports and dashboards. |
| Star Office UI | ★ 7.6k | A self-hosted pixel-art office that shows an AI agent's live work state, with a character moving between desk, sofa and bug corner as it writes, idles or hits errors; built for OpenClaw but drivable by any HTTP client. |
| Langtrace | ★ 1.2k | Open source OpenTelemetry observability for LLM applications |

