Affects: \3.1.3


During the migration of instrumentation from the old APIs, based on WebMvcMetricsFilter, to the new Micrometer Observability-based API shipped with Spring 6, we have had doubts of what to do with the AutoTimer that was before configured in the implementations of WebMvcMetricsFilter.

After asking in Stack Overflow and with further review of the documentation, we have found out that the way to configure timers for counters and the associated SLO should be based on MetricsFilter's instead. You can see the details of the question in SO here.

But the fact that AutoTimer is still arround without @Deprecated can lead to confusions, since one might think that there is still a way of using it for the purpose it was used before. Therefore, IMHO it should be marked as deprecated to avoid such confusion.

Comment From: snicoll

AutoTimer is part of Spring Boot so I am going to move this to the appropriate issue tracker.

Comment From: wilkinsona

Thanks for the suggestion. AutoTimer cannot be deprecated as it's still used. For example:

https://github.com/spring-projects/spring-boot/blob/5ff4a961b131a32c3b6417a4ebd0e55fe8d1a504/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/data/MetricsRepositoryMethodInvocationListener.java#L57-L58