pl.allegro.tech.hermes.management.config.MonitoringClientPropertiesConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-management Show documentation
Show all versions of hermes-management Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.management.config;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/*
These properties beans must be in different configuration class than ExternalMonitoringConfiguration.java. It allows
avoiding circular dependencies between beans.
*/
@Configuration
public class MonitoringClientPropertiesConfiguration {
@Bean
@ConfigurationProperties("prometheus.client")
@ConditionalOnProperty(value = "prometheus.client.enabled", havingValue = "true")
public PrometheusMonitoringClientProperties prometheusMonitoringClientProperties() {
return new PrometheusMonitoringClientProperties();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy