I have a bean that has a request scope and in it there is a method that is annotated with micrometer(io.micrometer.core.annotation) @Timed but it is not showing in the metrics. It shows if the bean is in the default scope (Singleton).
@RequestScope
@Component
public class MyTask {
//some local variables here
public MyTask() {
//some unhelpful stuff
}
@Timed(value = "mappingTask")
@Override
public void map(List<MyPojo> myApps) {
//Some process
}
}
Is it not supposed to work with Request scope or what am I missing.