I have some caches
@Service
@CacheConfig(cacheNames = "myCache")
public class MyService { ... }
@Service
@CacheConfig(cacheNames = "myOtherCache")
public class MyOtherService { ... }
I get with "/actuator/metrics/cache.gets"
{
"name" : "cache.gets",
"measurements" : [ {
"statistic" : "COUNT",
"value" : 5.0
} ],
"availableTags" : [ {
"tag" : "result",
"values" : [ "hit", "miss" ]
}, {
"tag" : "cache",
"values" : [ "myCache", "myOtherCache" ]
}, {
"tag" : "name",
"values" : [ "myCache", "myOtherCache" ]
}, {
"tag" : "cacheManager",
"values" : [ "cacheManager" ]
} ]
}
how can I obtain the hit and miss values for myCache and myOtherCache?
You should use the tags as explained here : http://blog.davidvassallo.me/2018/03/13/drill-down-into-spring-boot-actuator-metrics/
GET .../actuator/metrics/cache.gets?tag=name:myCache
GET .../actuator/metrics/cache.gets?tag=name:myOtherCache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With