quarkus: SmallRye Metrics - JandexBeanInfoAdapter does not reflect changes made by AnnotationTransformer

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().

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

Ok then that makes it a bit complex, because it will need changes on SmallRye Metrics side. I like the approach with SecurityCheckStorageBuilder and think something similar could be used in SmallRye for storing the (pre-computed) mapping between methods and metrics so we won’t have to use runtime reflection to determine it on-the-fly. But as this kinda is an architectural change for SmallRye Metrics, I can just hope you’re not relying on this being ready before DevConf 😃 I can get to it after the Christmas break, but can’t really promise now