fix: report bandwidth check failures the same way the other HTTP checks do - #180
Conversation
|
Claude finished @joshiste's task in 3m 13s —— View job Claude's PR ReviewTodo list:
SummaryThis is a well-structured change. The window-swap pattern in A few things worth double-checking, none of which I'd block on:
No security, concurrency, or correctness bugs found. I was unable to execute |
…ks do Every failure kind (request-build error, transport error, bad status code, body-read error) previously collapsed into one generic error count, so a failed run couldn't be diagnosed from the metric alone and the chart never distinguished why a window failed. Transport errors now report their actual (address-normalized) cause under the same "error" key the other HTTP checks use, driving the same "Failure" widget grouping. Status codes are now reported for every call, successful or not, under "http_status", with "expected_http_status" driving a new "Unexpected Status" grouping - mirroring the other checks' per-request fields exactly, generalized to "did this window see any of these" for the windowed bandwidth metric.
0bacb07 to
9f6fc6e
Compare
|



Summary
Every kind of bandwidth-check failure (a transport error, a bad status code, a body-read error) previously collapsed into one generic error count, so a failed run gave no clue what actually went wrong - the metric said "N request(s) failed" and nothing else, and the chart couldn't tell a connection timeout apart from a 503.
The bandwidth check's metric and widget now report failures the same way the other HTTP checks (Requests/s, Fixed amount) already do:
error(e.g."context deadline exceeded (2), connection reset by peer (1)"), driving the same Failure grouping.http_status, withexpected_http_statusdriving a new Unexpected Status grouping - identical field names to the per-request checks, generalized to a measurement window.Test plan
go test ./exthttpcheck/...(including-race) passesgo build,go vet,gofmt -lclean