diff --git a/src/langsmith/trace-with-opentelemetry.mdx b/src/langsmith/trace-with-opentelemetry.mdx index ad0cb5bc0e..40b3c3d5e6 100644 --- a/src/langsmith/trace-with-opentelemetry.mdx +++ b/src/langsmith/trace-with-opentelemetry.mdx @@ -1,8 +1,10 @@ --- title: Trace with OpenTelemetry +description: Configure OpenTelemetry tracing in LangSmith, including LANGSMITH_OTEL_ENABLED and OTEL fanout with the OpenTelemetry Collector. sidebarTitle: OpenTelemetry --- + LangSmith supports OpenTelemetry-based tracing, allowing you to send traces from any OpenTelemetry-compatible application. This guide covers both automatic instrumentation for LangChain applications and manual instrumentation for other frameworks. Learn how to trace your LLM applications using OpenTelemetry with LangSmith. @@ -591,6 +593,10 @@ Here is an [example](https://smith.langchain.com/public/9574f70a-b893-49fe-8c62- ### Use OpenTelemetry collector for fan-out +Use `LANGSMITH_OTEL_ENABLED=true` when you need OTEL fanout. Configure your application to emit OTEL spans once, then use an OpenTelemetry Collector to route them to LangSmith and any additional observability backends. + +Use this approach when you are tracing applications and want multi-destination routing. If you are operating LangSmith platform infrastructure telemetry (logs, metrics, traces from self-hosted LangSmith services on Kubernetes), use the [Configure your collector for LangSmith telemetry](/langsmith/langsmith-collector) guide instead. + For more advanced scenarios, you can use the OpenTelemetry Collector to fan out your telemetry data to multiple destinations. This is a more scalable approach than configuring multiple exporters in your application code. 1. [Install the OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started/) for your environment.