You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(agent-bff): flush spans from the shutdown path, not from a signal handler
Two problems with the flush being its own SIGTERM listener, both raised in review.
It armed at --require time, before the CLI arms its shutdown handler. A signal in
that window was consumed by a listener that terminates nothing, so the process ran
on until SIGKILL — the same PID 1 trap as before, one layer up.
And it was detached, so the exit could cut an export still in flight.
The preload now parks the SDK on a shared handle and arms nothing; armShutdown
flushes through it and waits, so the exit cannot race the export. The flush gets its
own 2s deadline rather than the 10s in-flight requests get: telemetry is not worth
holding a shutdown past an orchestrator's patience. Worst case a dead collector adds
~3s. Verified: exit 0 either way.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments