Langtrace

Stale
GitHub TypeScript AGPL-3.0

Description

Langtrace is an open-source, OpenTelemetry-based end-to-end observability tool for LLM applications, providing real-time tracing, evaluations, and metrics for popular LLMs, agent frameworks, and vector databases.

Key Features

  • OpenTelemetry-based tracing — captures traces following OTEL standards with semantic conventions for LLM spans
  • Real-time monitoring — track LLM API calls, vector operations, and framework usage with live dashboards
  • Broad integration support — auto-captures traces from OpenAI, Anthropic, Azure, LangChain, LlamaIndex, Pinecone, and 30+ providers
  • Performance analytics — analyze latency, token costs, and usage patterns across your LLM applications
  • Self-hosted option — deploy on your own infrastructure with Docker Compose (Next.js + Postgres + Clickhouse)
  • TypeScript and Python SDKs — simple 2-line setup for both languages with environment variable or API key initialization

Use Cases

💡 LLM application debugging — trace and debug complex multi-step LLM workflows to identify failures and bottlenecks
💡 Cost optimization — monitor token usage and costs across providers to optimize spending
💡 Performance monitoring — track latency, throughput, and error rates for production LLM services
💡 RAG pipeline observability — monitor vector database queries and retrieval quality in retrieval-augmented generation
💡 Compliance and auditing — maintain trace logs for AI-generated outputs for regulatory compliance

Quick Start

For cloud: sign up at langtrace.ai, create a project, generate an API key. Install SDK (`npm i @langtrase/typescript-sdk` or `pip install langtrace-python-sdk`), import before other modules, and call `Langtrace.init({ api_key })`. For self-hosted: run `docker compose up` to start Next.js + Postgres + Clickhouse at localhost:3000.

Related Projects