How do I use OpenTelemetry (OTEL) with LangSmith?

Last updated: August 28, 2025

Context

Users want to understand how to use OpenTelemetry (OTEL) with LangSmith for tracing their applications, and what capabilities are available across different programming languages.

Answer

LangSmith supports OpenTelemetry integration for tracing capabilities. Here's what you need to know about OTEL support across different languages:

Python:

  • Full native support for OTEL integration

  • Can send traces to both LangSmith and other OTEL providers simultaneously

  • Provides the most complete tracing experience

JavaScript/TypeScript:

  • OTEL support is available in recent versions

  • Currently works with 'traceable' and AI SDK integration

  • Support for LangChain/LangGraph integration is in development

Other Languages (Go, Java):

  • No official SDKs available

  • Can instrument applications using OpenTelemetry and send spans to LangSmith's OTLP HTTP endpoint

  • Required headers:

    • x-api-key

    • Langsmith-Project (optional)

Important Notes:

  • LangSmith currently only supports traces (not metrics or logs)

  • The native LangSmith tracing experience provides the best functionality, but there are no functional differences once traces are in LangSmith

  • Recommended for distributed tracing scenarios where you need end-to-end visibility

For detailed implementation instructions, refer to the following documentation: