Auto configure micrometer cache metrics
Closes gh-11221
This commit is contained in:
@@ -1256,6 +1256,8 @@ content into your application. Rather, pick only the properties that you need.
|
||||
management.metrics.binders.logback.enabled=true # Whether to enable Logback metrics.
|
||||
management.metrics.binders.processor.enabled=true # Whether to enable processor metrics.
|
||||
management.metrics.binders.uptime.enabled=true # Whether to enable uptime metrics.
|
||||
management.metrics.cache.cache-metric-name=cache # Name of the metric for cache usage.
|
||||
management.metrics.cache.instrument-cache=true # Instrument all available caches.
|
||||
management.metrics.export.atlas.batch-size= # Number of measurements per request to use for the backend. If more measurements are found, then multiple requests will be made.
|
||||
management.metrics.export.atlas.config-refresh-frequency= # Frequency for refreshing config settings from the LWC service.
|
||||
management.metrics.export.atlas.config-time-to-live= # Time to live for subscriptions from the LWC service.
|
||||
|
||||
@@ -1017,6 +1017,30 @@ following information:
|
||||
|
||||
|
||||
|
||||
[[production-ready-metrics-cache]]
|
||||
=== Cache metrics
|
||||
Auto-configuration will enable the instrumentation of all available ``Cache``s on startup
|
||||
with a metric named `cache`. The prefix can be customized by using the
|
||||
`management.metrics.cache.cache-metric-name` property. Cache instrumentation is specific
|
||||
to each cache library, refer to https://micrometer.io/docs[the micrometer documentation]
|
||||
for more details.
|
||||
|
||||
The following cache libraries are supported:
|
||||
|
||||
* Caffeine
|
||||
* EhCache 2
|
||||
* Hazelcast
|
||||
* Any compliant JCache (JSR-107) implementation
|
||||
|
||||
Metrics will also be tagged by the name of the `CacheManager` computed based on the bean
|
||||
name.
|
||||
|
||||
NOTE: Only caches that are available on startup are bound to the registry. For caches
|
||||
created on-the-fly or programmatically after the startup phase, an explicit registration
|
||||
is required. A `CacheMetricsRegistrar` bean is made available to make that process easier.
|
||||
|
||||
|
||||
|
||||
[[production-ready-metrics-jdbc]]
|
||||
=== DataSource metrics
|
||||
Auto-configuration will enable the instrumentation of all available ``DataSource``s with a
|
||||
|
||||
Reference in New Issue
Block a user