I am trying to generate Prometheus metrics with using Micrometer.io with Spring Boot 2.0.0.RELEASE.
When I am trying to expose the size of a List as Gauge, it ke
my example for gauge using
private final AtomicLong countTryUsers = new AtomicLong(0);
Metrics.gauge("app.countTry", countTryUsers);
public void updateCountTryUsers(Long countTryUsersDb){
countTryUsers.set(countTryUsersDb);
}
so I register app.countTry just once, and then just update AtomicLong countTryUsers over custom method updateCountTryUsers()