Unhandled exceptions should mark Servlet observation outcome as error #29512
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
theme: observability
An issue related to observability and tracing
type: bug
A general bug
Milestone
Affects: 6.0.0
If micrometer-observation is set-up and if I throw an exception from a controller:
This is the response I get:
Please notice that the status is
500
.If I check the prometheus output after this single call, this is what I get:
The issues:
outcome="SUCCESS"
I think should beSERVER_ERROR
but notSUCCESS
status="200"
This should be500
2.0
This should be1.0
, also, every subsequent request increases this counter by 2.The happy-path scenario works as expected, only if I throw out an exception from the controller does this.
The metrics endpoint shows the same:
/actuator/metrics/http.server.requests?tag=error:IllegalStateException
If I register an
@ExceptionHandler
, everything works as expected:This might be connected to #29398
The text was updated successfully, but these errors were encountered: