use of org.commonjava.indy.metrics.healthcheck.IndyHealthCheckRegistrySet in project indy by Commonjava.
the class IndyMetricsManager method initMetric.
@PostConstruct
public void initMetric() {
if (!config.isMetricsEnabled())
return;
IndyJVMInstrumentation.init(metricRegistry);
IndyHealthCheckRegistrySet healthCheckRegistrySet = new IndyHealthCheckRegistrySet();
indyMetricsHealthChecks.forEach(indyHealthCheck -> {
healthCheckRegistrySet.register(indyHealthCheck.getName(), (HealthCheck) indyHealthCheck);
});
try {
metricRegistry.register(healthCheckRegistrySet.getName(), healthCheckRegistrySet);
reporter.initReporter(metricRegistry);
} catch (Exception e) {
logger.error(e.getMessage());
throw new RuntimeException(e);
}
}
Aggregations