LangChain Support
Back to LangSmith Observability

LangSmith-SDK OTEL Mode Memory Leak 9/5/25

LangSmith Observability·1 min read·Sep 5, 2025··

Summary

A memory leak has been identified in the LangSmith-SDK when OTEL tracing mode is enabled. This issue can cause pods to run out of memory (OOM) within hours under certain workloads.

Impact

  • Affects users who set either of the following environment variables:

    • LANGSMITH_OTEL_ENABLED="true"

    • LANGSMITH_OTEL_ONLY="true"

  • In these modes, memory usage grows rapidly and can lead to pod crashes (OOMKilled events in Kubernetes).

Resolution

  • The issue was fixed in LangSmith-SDK version 0.4.25.

  • Documentation has been updated to advise all users running OTEL tracing to upgrade to at least version 0.4.25.

  • If you are currently using OTEL tracing (LANGSMITH_OTEL_ENABLED or LANGSMITH_OTEL_ONLY), upgrade your SDK immediately:

pip3 install --upgrade langsmith>=0.4.25
  • Restart your pods or services after the upgrade to ensure the fix takes effect.