Tracing LangGraph using OpenTelemetry (OTel) allows you to send telemetry data directly to the LangSmith platform. This compatibility standardizes the tracing of your LLM-powered applications, regardless of whether you are using LangChain or another framework.
To enable OTel and set the OTel exporter as the LangSmith endpoint, you must first install the langsmith[otel] library and then configure the environment variables.
1Navigate to the external-libs path that is configure in your system. The following is the default path:
Note: Be sure to include the "--target" option. If you omit the target, the libraries are installed into a subdirectory of the latest AIAgentRuntime path and will be ignored when the package is updated.
3Navigate to the latest AIAgentRuntime package path: