How does@Timed behave on non-@Scheduled methods? (IE if SomeBean.doWork() were annotated)
Right now, it's just used to instrument @Scheduled, and @RequestMapping (and the @GetMapping type variations). So it would do nothing.
Presumably we could add a pointcut to do something similar for an arbitrary method. For scheduled and request mappings, I'm trying to get the necessary changes in to spring framework 5.+ so that you don't need AOP at all.
It would be good to mention it in the documentation. I had spent some time before I found that issue trying to explain why my @Timed-annotated method with a non @RestTemplate remote server call doesn't generate any metrics...
Most helpful comment
Right now, it's just used to instrument
@Scheduled, and@RequestMapping(and the@GetMappingtype variations). So it would do nothing.Presumably we could add a pointcut to do something similar for an arbitrary method. For scheduled and request mappings, I'm trying to get the necessary changes in to spring framework 5.+ so that you don't need AOP at all.