Polish "Stop time web metrics when autotime is disabled"
See gh-19981
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 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.
|
||||
@@ -144,11 +144,11 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter {
|
||||
Builder builder = this.autoTimer.builder(this.metricName);
|
||||
timerSample.stop(getTimer(builder, handler, request, response, exception));
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (Timed annotation : annotations) {
|
||||
Builder builder = Timer.builder(annotation, this.metricName);
|
||||
timerSample.stop(getTimer(builder, handler, request, response, exception));
|
||||
} else {
|
||||
for (Timed annotation : annotations) {
|
||||
Builder builder = Timer.builder(annotation, this.metricName);
|
||||
timerSample.stop(getTimer(builder, handler, request, response, exception));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user