io.quarkus.cache.runtime.caffeine.metrics.MicrometerMetricsInitializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-cache Show documentation
Show all versions of quarkus-cache Show documentation
Enable application data caching in CDI beans
package io.quarkus.cache.runtime.caffeine.metrics;
import org.jboss.logging.Logger;
import com.github.benmanes.caffeine.cache.AsyncCache;
import io.micrometer.core.instrument.Metrics;
import io.micrometer.core.instrument.binder.cache.CaffeineCacheMetrics;
/**
* An instance of this class is created during the instantiation of the Caffeine caches when the application depends on a
* quarkus-micrometer-registry-* extension.
*/
public class MicrometerMetricsInitializer implements MetricsInitializer {
private static final Logger LOGGER = Logger.getLogger(MicrometerMetricsInitializer.class);
@Override
public boolean metricsEnabled() {
return true;
}
@Override
public void recordMetrics(AsyncCache
© 2015 - 2025 Weber Informatics LLC | Privacy Policy