langwatch
LangWatch Python SDK, for monitoring your LLMs
What it is and what it does
LangWatch is an observability SDK that integrates with Python LLM applications to capture and export traces of LLM interactions. It uses OpenTelemetry as its instrumentation foundation and provides decorators (@langwatch.trace() and @langwatch.span()) to mark entry points and individual operations within your LLM pipeline. The SDK automatically captures function inputs, outputs, and metadata, then sends this telemetry to the LangWatch cloud platform for monitoring and analysis.
The package includes built-in instrumentors for popular frameworks—OpenAI, LangChain, Haystack, and CrewAI—allowing automatic capture of LLM calls without manual span creation. You can also manually create spans for custom operations like RAG retrieval or database queries. Traces can be grouped by thread_id for conversation tracking and by user_id for user analytics. The SDK is designed to integrate into existing OpenTelemetry setups or work standalone with minimal configuration.
Use it for:
- Monitor OpenAI, LangChain, or Haystack LLM calls in production to track latency, errors, and token usage.
- Group related LLM operations into conversations using thread_id for multi-turn dialogue analysis.
- Capture RAG retrieval steps and other custom pipeline stages as nested spans within a single trace.
- Track user interactions and analytics by attaching user_id metadata to traces.
- Debug LLM application behavior by exporting detailed traces to the LangWatch dashboard.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
LangWatch is a Python SDK for instrumenting and monitoring LLM applications, capturing traces and spans of LLM interactions to send to the LangWatch observability platform.
Yes, if you are building or operating a Python LLM application and want observability into LLM interactions. The SDK is actively maintained, has low install friction, uses a permissive MIT license, and integrates cleanly with popular frameworks. Install only if you have a LangWatch account and API key; the SDK is designed specifically for the LangWatch platform and will not be useful without it.
Install
langwatch on PyPI
pip
pip install langwatchuv
uv add langwatchpoetry
poetry add langwatchInstalling langwatch
Before you install
Low friction install with a pure-Python wheel. Active maintenance (released 7 days ago). Depends on 21 runtime packages including OpenTelemetry, Pydantic, and framework-specific instrumentors for Haystack, LangChain, OpenAI, and CrewAI.
License in practice
MIT license (permissive). You can use, modify, and distribute this package with minimal restrictions in commercial and open-source projects.
Quickstart
pip install langwatch
import langwatch
langwatch.setup() # Uses LANGWATCH_API_KEY env var
@langwatch.trace()
async def my_llm_operation():
# Your LLM code here
pass
Requires Python 3.10 or later. Requires a LangWatch API key (set via LANGWATCH_API_KEY environment variable or passed to setup()).
Verify before relying
- Whether the package automatically instruments all major LLM frameworks or requires explicit setup per framework.
- Performance overhead of tracing on typical LLM application throughput.
- Data retention and privacy guarantees for traces sent to LangWatch servers.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<3.14,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 21 — attrs, coolname, deprecated, httpx, nanoid, openinference-instrumentation-haystack, openinference-instrumentation-langchain, openinference-instrumentation-openai, openinference-semantic-conventions, opentelemetry-api, opentelemetry-exporter-otlp-proto-http, opentelemetry-instrumentation-crewai, opentelemetry-sdk, pksuid, pydantic, python-liquid, pyyaml, retry, tenacity, termcolor, tqdm |
| Maintenance | actively maintained — 7 days since the last release |
| First released | |
| Downloads | 332,925/month — #7,502 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langwatch-1.2.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
openinference-instrumentation-openaiAuto-instruments OpenAI Python SDK calls to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-openai-v2Automatically traces and logs OpenAI API calls…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-groqAutomatically captures traces of Groq SDK API…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-openaiCaptures traces of OpenAI API calls (prompts,…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-ollamaAdds distributed tracing to Ollama Python…
permissive · top 5,000 on PyPI
arize-otelWraps OpenTelemetry with Arize-aware defaults…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-llamaindexAdds distributed tracing to LlamaIndex…
permissive · top 5,000 on PyPI
promptlayerPromptLayer is a Python SDK for managing,…
permissive · top 15,000 on PyPI
openinference-instrumentation-langchainAuto-instruments LangChain applications to…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-langchainAdds distributed tracing to Langchain LLM…
permissive · top 5,000 on PyPI