Context
When debugging issues in LangSmith services, users may need to correlate error logs with specific requests. LangSmith provides OpenTelemetry trace IDs and span IDs in its logs to help with this correlation.
Answer
LangSmith automatically injects trace information into all logs generated by its services. To find the trace information in your logs, look for these fields:
trace_id- The OpenTelemetry trace identifierspan_id- The OpenTelemetry span identifier
These fields are automatically included in both Python and Go service logs, allowing you to map specific errors back to the requests that generated them.