Skip to content

Log stalled event delivery to the client - #403

Open
vincebln2 wants to merge 3 commits into
VibiumDev:mainfrom
vincebln2:fix/router-slow-delivery-log
Open

Log stalled event delivery to the client#403
vincebln2 wants to merge 3 commits into
VibiumDev:mainfrom
vincebln2:fix/router-slow-delivery-log

Conversation

@vincebln2

Copy link
Copy Markdown
Collaborator

Part of #397. Observability for mechanism 1 (events reaching the client late): when the client stops reading its pipe, the router's Send blocks and every later event queues behind it, arriving late. Today that is invisible; the run just shows a flaky waiter or a listener firing after removal.

A Send that blocks for a second or more now logs the client id, the event method, and the stall duration to stderr. Healthy delivery is microseconds, so the log stays quiet outside genuine stalls. With this in place the next incident names the wedged side instead of leaving only a hung test to interpret.

Verified: go build, go vet, and the api package tests pass; the log line only fires above a one second stall, well beyond scheduler jitter on loaded runners.

vincebln2 and others added 3 commits August 21, 2026 13:47
When the client stops reading its pipe, Send blocks and every later
event queues behind it, reaching the client late. That is invisible
today: the run just shows flaky waiters or listeners firing after
removal. A Send that blocks for a second or more now logs the client,
the event method, and the stall duration, so the next incident names
the wedged side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant