Class PrometheusDependencyCheck
- java.lang.Object
-
- com.broadleafcommerce.common.extension.PrometheusDependencyCheck
-
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
public class PrometheusDependencyCheck extends Object implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
If prometheus is currently deployed with the system (especially in the case of a k8s deployment), this dependency check may be leveraged to determine if a set of dependent services are available. It uses the following properties:broadleaf.startup.dependency.check.services- comma delimited list of service names to check for up statusbroadleaf.startup.dependency.check.prometheus.url- the full url at which prometheus is availablebroadleaf.startup.dependency.check.prometheus.label- (Optional). If specified, the label in the prometheus json response that should be matched against the service list. Defaults to "k8s_app"broadleaf.startup.dependency.check.retry.interval- the number of seconds between each retry attempt. Defaults to 5 seconds.broadleaf.startup.dependency.check.max.wait- the number of seconds after which the component will no longer wait and allow the application to continue. Default is 300.
-
-
Constructor Summary
Constructors Constructor Description PrometheusDependencyCheck(org.springframework.core.env.Environment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpostProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry beanDefinitionRegistry)voidpostProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory configurableListableBeanFactory)
-
-
-
Method Detail
-
postProcessBeanDefinitionRegistry
public void postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry beanDefinitionRegistry) throws org.springframework.beans.BeansException- Specified by:
postProcessBeanDefinitionRegistryin interfaceorg.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory configurableListableBeanFactory) throws org.springframework.beans.BeansException- Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor- Throws:
org.springframework.beans.BeansException
-
-