pl.allegro.tech.hermes.consumers.config.PrometheusConfigAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-consumers Show documentation
Show all versions of hermes-consumers Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.consumers.config;
import io.micrometer.prometheus.PrometheusConfig;
import java.time.Duration;
public class PrometheusConfigAdapter implements PrometheusConfig {
private final PrometheusProperties prometheusReporterProperties;
public PrometheusConfigAdapter(PrometheusProperties prometheusReporterProperties) {
this.prometheusReporterProperties = prometheusReporterProperties;
}
@Override
public boolean descriptions() {
return prometheusReporterProperties.isDescriptions();
}
@Override
public Duration step() {
return prometheusReporterProperties.getStep();
}
/**
* Returning null is fine since we override all the methods from PrometheusConfig.
*/
@Override
public String get(String key) {
return null; // Nothing to see here, move along.
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy