pl.allegro.tech.hermes.common.metric.ConsistencyMetrics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-common Show documentation
Show all versions of hermes-common Show documentation
Fast and reliable message broker built on top of Kafka.
The newest version!
package pl.allegro.tech.hermes.common.metric;
import io.micrometer.core.instrument.MeterRegistry;
import java.util.function.ToDoubleFunction;
public class ConsistencyMetrics {
private final MeterRegistry meterRegistry;
ConsistencyMetrics(MeterRegistry meterRegistry) {
this.meterRegistry = meterRegistry;
}
public void registerStorageConsistencyGauge(T stateObject, ToDoubleFunction valueFunction) {
meterRegistry.gauge("storage.consistency", stateObject, valueFunction);
}
}