Synchronous tracing increases P99 latency from 200ms to 800ms
warningperformanceUpdated Mar 9, 2026(via Exa)
Technologies:
How to detect:
When LangFuse tracing runs in synchronous mode in production, trace data transmission to the API blocks the main thread. P99 response time increased from 200ms to 800ms. The latency of the LangFuse API server propagates directly into user-facing response latency.
Recommended action:
1) Set LANGSMITH_TRACING_BACKGROUND=true to enable asynchronous mode. 2) Apply circuit breaker pattern to disable tracing when the API is down. 3) Implement sampling to trace only 10-20% of requests. 4) Enable batch transmission to buffer traces and send in bulk instead of immediately.