See every token.
Debug any trace.

OpenTelemetry-native tracing for LLM apps. Instrument once and inspect every LLM call, tool call, and RAG retrieval across dev, staging, and production - with cost and latency on every span.

Read the docs$ pip install langwatch
trace · handle_message1.84s · 6 spans
handle_message
1.84s
RAG Document Retrieval
0.42s
embed query
0.12s
vector_search
0.2s
generate_answer
1.24s
format_response
0.06s

Instrument your app in two lines.

Auto-instruments OpenAI, LangChain, LangGraph, and more.

OpenTelemetry-native
pip install langwatch

import langwatch
from openai import OpenAI
client = OpenAI()

langwatch.setup()

@langwatch.trace()
def handle_message(message):
    langwatch.get_current_trace().autotrack_openai_calls(client)
    # ... your message handling logic ...

Capture the whole pipeline - and the whole conversation.

Trace

One task end-to-end - a user message.

Span

A single step: an LLM call, a RAG retrieval, a function. Spans nest to capture your pipeline structure.

Thread

Group traces into a conversation with thread_id; add user_id for user analytics.

handle_message1.84s · 6 spans · $0.004
Span
0ms460ms920ms1.38s1.84s
tracehandle_message
1.84s
ragRAG Document Retrieval
vector_search
llmembed query
text-embedding-3
toolvector_search
8 chunks
llmgenerate_answer
gpt-4o · 1.2k tok · $0.004
fnformat_response
0.06s
rag_retrieval.py
import langwatch
from langwatch.types import RAGChunk

@langwatch.span(type="rag", name="RAG Document Retrieval")
def rag_retrieval(query: str):
    results = retrieve(query)
    langwatch.get_current_span().update(
        contexts=[RAGChunk(document_id=d["id"], content=d["content"]) for d in results],
        retrieval_strategy="vector_search",
    )
    return results

@langwatch.span() auto-captures inputs/outputs (toggle with capture_input / capture_output).

Built on OpenTelemetry. Works with your whole stack.

LangWatch traces are standard OpenTelemetry spans, enriched with semantic attributes (langwatch.span.type, langwatch.inputs, langwatch.outputs). Send them to any OTel backend and combine LLM spans with the rest of your app for a true end-to-end view.

LangWatch spans
LangWatchJaegerTempoDatadog
Auto-instrumented
OpenAIAzureLangChainLangGraphDSPyCrewAIHaystackAWS BedrockLiteLLMVercel AI SDKPydantic AI…and anything that speaks OpenTelemetry
OpenTelemetry migration guide

What you get.

search traces · status:error OR latency > 2s
tracesummarydurationtokcost
tr_8f3arefund request · gpt-4o1.8s1.2k$0.004
tr_2c9dorder status · RAG0.9s420$0.001
tr_e7b1login help · tool-call2.4s2.0k$0.006
tr_5a8bbusiness hours · gpt-4o-mini0.6s180$0.000
Search & inspect

Instantly search and inspect any LLM interaction across environments - debug failures, investigate incidents, support audits.

Cost & tokens

Automatic cost and token tracking per provider, attributable by user, prompt, or model.

Quality over time

Monitor quality and latency over time and get alerted on regressions and incidents.

Data flywheel

Turn production traces into evaluation datasets automatically - observability feeds your evals.

Full control when you need it.

Custom attributes, instrumentors, span-exclude rules, your own TracerProvider, and self-hosting.

Self-host with docker compose
Self-hosting + OpenTelemetry migration docs →
langwatch_setup.py
langwatch.setup(
    api_key=os.getenv("LANGWATCH_API_KEY"),
    endpoint_url="https://your-langwatch-instance.com",  # cloud or self-hosted
    base_attributes={AttributeKey.ServiceName: "my-service"},
    instrumentors=[OpenAIInstrumentor()],
    span_exclude_rules=[...],   # e.g. drop GET /health_check
    debug=True,
)

Start tracing.

Read the docs$ pip install langwatch