So for example, if you add the @Counted
annotation to a bean class you'll get a UnsupportedOperationException
at runtime:
Caused by: java.lang.UnsupportedOperationException
at io.smallrye.metrics.interceptors.MetricResolver$DoesNotHaveMetric.metricName(MetricResolver.java:182)
at io.smallrye.metrics.interceptors.CountedInterceptor.countedCallable(CountedInterceptor.java:86)
at io.smallrye.metrics.interceptors.CountedInterceptor.countedMethod(CountedInterceptor.java:70)
@jmartisk it should be possible to make use of AnnotationStore
obtained via io.quarkus.arc.deployment.ValidationPhaseBuildItem.getContext()
.