LangSmith Introducing End-to-End OpenTelemetry Support in LangSmith
Enable OpenTelemetry in your LangChain app by installing the otel extras and setting LANGSMITH_OTEL_ENABLED=true.
Add the otel extras to your environment, set the required env vars, and run a LangChain chain to verify traces appear in LangSmith.
Summary
On 26 March 2025 the LangChain team announced that LangSmith now offers full end‑to‑end OpenTelemetry (OTel) support, enabling developers to standardize tracing across their LangChain or LangGraph applications and send traces to LangSmith or other observability platforms. The update adds a pip install option "langsmith[otel]" and an environment variable LANGSMITH_OTEL_ENABLED that activates the integration, allowing automatic trace generation from LangChain components. Traces are converted to the OTel format by the LangSmith SDK and ingested by the platform, where they can be visualized alongside existing LLM‑specific dashboards. The integration supports distributed tracing across microservices, context propagation, and interoperability with Datadog, Grafana, and Jaeger. While the OTel pipeline offers maximum flexibility, it incurs slightly higher overhead compared to LangSmith’s native tracing format, which is optimized for LLM workloads. The release also highlights that native LangSmith tracing remains the recommended option for users who rely solely on LangSmith for observability. Developers can start using the feature by installing the otel extras, setting LANGSMITH_OTEL_ENABLED=true, and running a LangChain chain to verify that traces appear in the LangSmith dashboard.
Key changes
- Native OpenTelemetry support added to LangSmith SDK
- pip install "langsmith[otel]" enables OTel integration
- LANGSMITH_OTEL_ENABLED env var activates automatic trace generation
- Automatic trace conversion to OTel format and ingestion by LangSmith
- Distributed tracing across microservices with context propagation
- Interoperability with Datadog, Grafana, and Jaeger
- Higher overhead compared to native LangSmith tracing
- Native LangSmith tracing remains recommended for LLM‑only workloads