From 41c297063bf28b0b411daa5f5b3b330816bf35fb Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 20 Nov 2017 13:20:35 +0000 Subject: [PATCH] Record metrics for request handled by ParameterizableViewController Closes gh-10335 --- .../boot/actuate/metrics/web/servlet/WebMvcMetrics.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetrics.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetrics.java index f63ea9198a..b4723ddd26 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetrics.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetrics.java @@ -192,7 +192,8 @@ public class WebMvcMetrics { if (handler instanceof HandlerMethod) { return timed((HandlerMethod) handler); } - if ((handler == null || handler instanceof ResourceHttpRequestHandler) + if ((handler == null || handler instanceof ResourceHttpRequestHandler + || handler instanceof ParameterizableViewController) && this.autoTimeRequests) { return Collections.singleton( new TimerConfig(getServerRequestName(), this.recordAsPercentiles));