io.micrometer.core.annotation.Timed doesn't work
See original GitHub issuequarkus 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")
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Timed not working despite registering TimedAspect explicitly ...
I need to measure method-metrics using micrometer @Timed annotation. As it doesn't work on arbitrary methods; i added the configuration of ...
Read more >[Java] What metrics does Micrometer @Timed expose in New ...
I am getting 5 metrics through this which are 'Avg, 'Count', 'Sum', 'Max' and 'Min'.
Read more >Micrometer Application Monitoring
The micrometer-core modules contains a @Timed annotation that frameworks can use to add timing support to either specific types of methods such as...
Read more >io.micrometer.core.annotation.Timed Java Examples
This page shows Java code examples of io.micrometer.core.annotation.Timed.
Read more >@Timed Annotation Using Metrics and AspectJ | Baeldung
We need to ensure the AspectJ compilation plugin is included in the build for this to work. 4. Conclusion.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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
@Timedannotation 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. 😉