Merge branch '2.5.x'
This commit is contained in:
@@ -105,11 +105,15 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter {
|
||||
}
|
||||
catch (Exception ex) {
|
||||
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
|
||||
record(timingContext, request, response, (ex instanceof NestedServletException) ? ex.getCause() : ex);
|
||||
record(timingContext, request, response, unwrapNestedServletException(ex));
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
private Throwable unwrapNestedServletException(Throwable ex) {
|
||||
return (ex instanceof NestedServletException) ? ex.getCause() : ex;
|
||||
}
|
||||
|
||||
private TimingContext startAndAttachTimingContext(HttpServletRequest request) {
|
||||
Timer.Sample timerSample = Timer.start(this.registry);
|
||||
TimingContext timingContext = new TimingContext(timerSample);
|
||||
|
||||
Reference in New Issue
Block a user