Closed
Description
Version: Spring Boot 2.6.3.RELEASE with Webflux & Metrics
Scenario
- Client aborts the connection before server sends a response.
- Server request processing takes forever (server configured with read/write timeout). Server closes the connection
In both the above cases, metrics are generated. However they are stored with status = 200 implying success. Eg:
http_server_requests_seconds{app="test-v0",cid="",exception="CancelledServerWebExchangeException",host="xxx",method="GET",outcome="UNKNOWN",springBoot="2",status="200",uri="/slow",ver="0.0.1",quantile="0.5",} 0.872415232
Please see earlier issue #23606 for reference source code.
The correct status code for this situation is clearly not well defined. However by making it 200, the result looks like success if we monitor fot HTTP Status code. Something from the 400 series would suit this better.