use of zipkin.Component in project zipkin by openzipkin.
the class RegisterZipkinHealthIndicators method onApplicationEvent.
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (!(event instanceof ApplicationReadyEvent))
return;
ConfigurableListableBeanFactory beanFactory = ((ApplicationReadyEvent) event).getApplicationContext().getBeanFactory();
ZipkinHealthIndicator healthIndicator = beanFactory.getBean(ZipkinHealthIndicator.class);
for (Component component : beanFactory.getBeansOfType(Component.class).values()) {
healthIndicator.addComponent(component);
}
}
Aggregations