I am trying to use prometheus to monitor some cache metrics from spring-boot. The cache is created with @Cacheable and my configuration is as follows:
management.endpoints:
web.exposure.include: "*"
metrics.enabled: true
prometheus.enabled: true
management.metrics:
export.prometheus.enabled: true
cache.instrument: true
My cache is created with a simple @Cacheable('mycache') - I have no other cache code or setup. I'm also NOT using any specific cache provided just the built in one.
I do see my cache in the /actuator/caches/ list, but no detailed in either the /metrics or /prometheus endpoints.
My expectation was that some cache metrics would be published to both the /actuator/metrics and /actuator/prometheus endpoints.
I saw some notes about manually needing to register the cache, but I couldn't get that working either (nor am I sure it really pertains). When attempting to do this the issue is that I cannot autowire in the CacheMetricsRegistrar bean. It's not found.