part of me thinks that tracking the exception cases is acceptable. the app could handle the exception and convert it to a response using an
ExceptionMapper - in that case, they could throw a
WidgetNotFoundException right off the bat that gets converted to a 404 response, and that would also skew the metrics, but is handled.
but it's almost an anti-pattern to track timing for exceptional and clean requests in the same time series
agreed - it's just nice to know if a large portion of the requests end in unexpected errors
and given the time remaining that somewhat leads me to think we should just discard time/count measurements for JAX-RS requests that end in exceptions... and put that in the spec.
I think that gets tricky because of the exception mapping in JAX-RS. some third-party libraries (even MP OpenTracing) registers global
ExceptionMapper<Throwable> that catches all unhandled exceptions and converts them to "nicer" responses.