Merge branch '2.4.x' into 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);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
Reference in New Issue
Block a user