bandit icon indicating copy to clipboard operation
bandit copied to clipboard

No telemetry when client hangs up

Open joladev opened this issue 1 year ago • 0 comments

As expected, the [:bandit, :request, :start] event happens when a request starts, the [:bandit, :request, :exception] event happens when the request raises, and [:bandit, :request, :stop] happens when the request ends normally, but no event is emitted in the case where a request starts but then the client hangs up.

As an example use case, let's say you've got long running requests where you log them starting and ending. With longer running requests it's more likely that you'll have clients occasionally hanging up, and it's a bit confusing that you've got a telemetry event saying the request started but then nothing letting you know it has stopped.

For Cowboy I know you can use a stream handlers to hook into terminate and get that event, does Bandit have some method of notifying you that the client hung up?

joladev avatar Oct 18 '24 19:10 joladev