use of com.hotels.styx.javaconvenience.Stopwatch in project styx by ExpediaGroup.
the class StyxServer method createStyxServer.
private static StyxServer createStyxServer(String[] args) {
Stopwatch stopwatch = new Stopwatch();
StartupConfig startupConfig = parseStartupConfig(args);
LOG.info("Styx home={}", startupConfig.styxHome());
LOG.info("Styx configFileLocation={}", startupConfig.configFileLocation());
LOG.info("Styx logConfigLocation={}", startupConfig.logConfigLocation());
PrometheusMeterRegistry prometheusRegistry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
CompositeMeterRegistry compositeMeterRegistry = new CompositeMeterRegistry();
compositeMeterRegistry.add(prometheusRegistry);
StyxServerComponents components = new StyxServerComponents.Builder().registry(new MicrometerRegistry(compositeMeterRegistry)).styxConfig(parseConfiguration(startupConfig)).startupConfig(startupConfig).loggingSetUp(environment -> activateLogbackConfigurer(startupConfig)).showBanner(true).build();
return new StyxServer(components, stopwatch);
}
Aggregations