Problem with @Cacheable metrics in promotheus

98 views Asked by At

I have an application with SpringBoot 2.6.6 where we have SpringBootAdmin and Prometheus configured.

In the application we have several annotations with @Cacheable, when the services are executed it is saved in the cache correctly and if we review the Prometheus metrics in the SpringBootAdmin we can see how the number of hits and misses increases when accessing the cache.

enter image description here

The problem I have is that when we refresh the properties with the /actuator/refresh endpoint, the metric in Prometheus of the caches of the hits and miss values ​​stops updating, I have to restart the application for the metric to work correctly again.

Do you know why it may be that when you run the /actuator/refresh endpoint, the cache metric stops working?

I hope that when refreshing the properties with the /actuator/refresh endpoint the cache metrics continue to work correctly.

0

There are 0 answers