LangChain Support
Back to Self Hosted

How do I find trace IDs in LangSmith error logs?

Self Hosted·1 min read·Oct 16, 2025··

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 identifier

  • span_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.

References

Trace with LangChain (Python and JS/TS)

LangSmith run helpers