Search in sources :

Example 1 with MetricCollector

use of com.codingchili.core.metrics.MetricCollector in project chili-core by codingchili.

the class SystemContext method initialize.

private void initialize() {
    this.logger = new RemoteLogger(this, SystemContext.class);
    // add a shutdown hook for gracefully shutting down the context.
    ShutdownHook.register(this);
    vertx.exceptionHandler(throwable -> logger.onError(throwable));
    if (!initialized.get()) {
        this.metrics = new MetricCollector(this, Configurations.system().getMetrics(), MetricSettings.REGISTRY_NAME);
        StartupListener.publish(this);
        initialized.set(true);
    }
}
Also used : MetricCollector(com.codingchili.core.metrics.MetricCollector) RemoteLogger(com.codingchili.core.logging.RemoteLogger)

Aggregations

RemoteLogger (com.codingchili.core.logging.RemoteLogger)1 MetricCollector (com.codingchili.core.metrics.MetricCollector)1