DefaultServerRequestObservationConvention throws when response status is zero #33725
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
DefaultServerRequestObservationConvention#outcome
tests whether the response is null, and if so, returnsHTTP_OUTCOME_UNKNOWN
.Otherwise, it gets the
HttpOutcome
for theHttpStatusCode
for theHttpServletResponse#getStatus
.Somehow,
HttpServletResponse#getStatus
is coming through as zero in my application (I don't know what implementation ofHttpServletResponse
this is - I can't see the code of the platform I'm running on - the implementations I can find default to 200), which causesHttpStatusCode#valueOf
to throw anI propose that
DefaultServerRequestObservationConvention#outcome
should catch this exception and returnHTTP_OUTCOME_UNKNOWN
. I can make a pull request if you want.The text was updated successfully, but these errors were encountered: