quarkus version: 1.8.1
I'm using quarkus-smallrye-reactive-messaging-kafka and quarkus-resteasy-mutiny
When I add that annotation to a resteasy endpoint nothing happens
@Timed(value = ".my.endpoint")
later when I open prometious metrics endpoint curl localhost:8080/metrics/ I don't see my meters there. How can I time my endpoints?
Same happens when I try to time my kafka consumer. Nothing happens...
@Timed(value = ".my.consumer")
@Incoming("my-kafka-topic")
cc @ebullient
Right. The micrometer org is a little mixed on their @Timed annotation.. while present in core, support for it is optional. For Spring, e.g., supporting the @Timed annotation is optional (you have to add -aop because it is aspect based).
Any http endpoint is implicitly instrumented at the http level.
I'm adding support for reactive messaging instrumentation now (which would also be automatic, and at a much lower level than the @Timed annotation would be).
So. I can add support for @Timed (via this issue) to the hopper. In the meanwhile, if you want to create a timer for some element of handling, inject the MeterRegistry, and use .. any variant of Timer or LongTaskTimer methods to record how long certain steps take (probably along with results):
https://micrometer.io/docs/concepts#_timers
https://micrometer.io/docs/concepts#_long_task_timers
Unless this is urgent, I want to work on the implicit instrumentation of reactive-messaging first. ;)
Thanks @ebullient I'm migrating some Spring boot applications to Quarkus and this is kind of a blocker, because we'll lose our monitoring otherwise. Thanks for puting this task in your queue. Hopefully we could see @Timed in the next Quarkus release
Let me see if I can put something together... (though I know there is some contention around use for @Timed.. anyway.. give me a day.. )
Ok. PR attached -- it hasn't been reviewed, there will be force-pushes as I clean things up, but if you want to try something for experimentation purposes, here it is.
Most helpful comment
Ok. PR attached -- it hasn't been reviewed, there will be force-pushes as I clean things up, but if you want to try something for experimentation purposes, here it is.