Search in sources :

Example 1 with Stopwatch

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);
}
Also used : PrometheusMeterRegistry(io.micrometer.prometheus.PrometheusMeterRegistry) CompositeMeterRegistry(io.micrometer.core.instrument.composite.CompositeMeterRegistry) StyxServerComponents(com.hotels.styx.startup.StyxServerComponents) MicrometerRegistry(com.hotels.styx.api.MicrometerRegistry) NettyServerBuilder(com.hotels.styx.server.netty.NettyServerBuilder) AdminServerBuilder(com.hotels.styx.admin.AdminServerBuilder) Stopwatch(com.hotels.styx.javaconvenience.Stopwatch)

Aggregations

AdminServerBuilder (com.hotels.styx.admin.AdminServerBuilder)1 MicrometerRegistry (com.hotels.styx.api.MicrometerRegistry)1 Stopwatch (com.hotels.styx.javaconvenience.Stopwatch)1 NettyServerBuilder (com.hotels.styx.server.netty.NettyServerBuilder)1 StyxServerComponents (com.hotels.styx.startup.StyxServerComponents)1 CompositeMeterRegistry (io.micrometer.core.instrument.composite.CompositeMeterRegistry)1 PrometheusMeterRegistry (io.micrometer.prometheus.PrometheusMeterRegistry)1