vranac
2018-05-28 07:09:54 UTC
I want to introduce some metrics in web project. First option is to use
metrics from microprofile, but it seems that there is no support in TomEE
for that. Next was to use dropwizard metrics and corresponding cdi library(
metrics-cdi <https://github.com/astefanutti/metrics-cdi> ).But there is
problem using that library. Library is using interceptors to collect
metrics.There is small git project( tomee and metrics-cdi
<https://github.com/ashri/metrics-cdi-jaxrshttp://> ) build by other person
having the same issue.After some debug I can see that only one interceptors
<https://github.com/astefanutti/metrics-cdi/blob/master/impl/src/main/java/io/astefanutti/metrics/cdi/MetricsInterceptor.java>
is discover by TomEE from four interceptors that are needed to collect
metrics.If I add other interceptorts(e.g. TimedInterceptor
<https://github.com/astefanutti/metrics-cdi/blob/master/impl/src/main/java/io/astefanutti/metrics/cdi/TimedInterceptor.java>
) to the beans.xml then metrics are getting collected as expected. But, also
I get warning in console from TomEE that this interceptors are already
discovered. If i removed entries form beans.xml, then warning is gone, but
then there is no metrics collected.
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
metrics from microprofile, but it seems that there is no support in TomEE
for that. Next was to use dropwizard metrics and corresponding cdi library(
metrics-cdi <https://github.com/astefanutti/metrics-cdi> ).But there is
problem using that library. Library is using interceptors to collect
metrics.There is small git project( tomee and metrics-cdi
<https://github.com/ashri/metrics-cdi-jaxrshttp://> ) build by other person
having the same issue.After some debug I can see that only one interceptors
<https://github.com/astefanutti/metrics-cdi/blob/master/impl/src/main/java/io/astefanutti/metrics/cdi/MetricsInterceptor.java>
is discover by TomEE from four interceptors that are needed to collect
metrics.If I add other interceptorts(e.g. TimedInterceptor
<https://github.com/astefanutti/metrics-cdi/blob/master/impl/src/main/java/io/astefanutti/metrics/cdi/TimedInterceptor.java>
) to the beans.xml then metrics are getting collected as expected. But, also
I get warning in console from TomEE that this interceptors are already
discovered. If i removed entries form beans.xml, then warning is gone, but
then there is no metrics collected.
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html