1 year ago

#332861

test-img

Miguel Andrade

Update Micronaut metric without a controller or a job

I'm working in a micronaut project, using Kotlin, and I want to use micrometer to create a metric related with the number of entries that I've in the database.

My question is: The update of this metric must rely on a cronjob? What I want is when the metric's endpoint is requested (eg /metrics/name) it authomaticaly updates the metric and return the response. However, I don't want to have a route in a controller dedicated to it. So there's any way of doing it? Regards

kotlin

micronaut

micrometer

micronaut-micrometer

0 Answers

Your Answer

Accepted video resources