use of io.helidon.metrics.MetricsSupport in project helidon by oracle.
the class Main method createAdminRouting.
/**
* Creates admin {@link Routing}.
*
* @return routing for use on admin port
*/
private static Routing createAdminRouting() {
MetricsSupport metrics = MetricsSupport.create();
HealthSupport health = HealthSupport.builder().addLiveness(// Adds a convenient set of checks
HealthChecks.healthChecks()).build();
return Routing.builder().register(health).register(metrics).build();
}
use of io.helidon.metrics.MetricsSupport in project helidon by oracle.
the class Main method createPublicRouting.
/**
* Creates public {@link Routing}.
*
* @return routing for use on "public" port
*/
private static Routing createPublicRouting(Config config) {
MetricsSupport metrics = MetricsSupport.create();
HealthSupport health = HealthSupport.builder().addLiveness(// Adds a convenient set of checks
HealthChecks.healthChecks()).build();
GreetService greetService = new GreetService(config);
return Routing.builder().register(health).register(metrics).register("/greet", greetService).build();
}
use of io.helidon.metrics.MetricsSupport in project helidon by oracle.
the class ServerMain method createRouting.
/**
* Creates new {@link Routing}.
*
* @param config configuration of this server
* @return routing configured with JSON support, a health check, and a service
*/
private static Routing createRouting(Config config) {
MetricsSupport metrics = MetricsSupport.create();
GreetService greetService = new GreetService(config);
return Routing.builder().register(metrics).register("/greet", greetService).build();
}
use of io.helidon.metrics.MetricsSupport in project helidon by oracle.
the class Main method createRouting.
/**
* Creates new {@link Routing}.
*
* @return routing configured with a health check, and a service
* @param config configuration of this server
*/
private static Routing createRouting(Config config) {
MetricsSupport metrics = MetricsSupport.create();
GreetService greetService = new GreetService(config);
HealthSupport health = HealthSupport.builder().addLiveness(// Adds a convenient set of checks
HealthChecks.healthChecks()).build();
return Routing.builder().register(OpenAPISupport.create(config.get(OpenAPISupport.Builder.CONFIG_KEY))).register(// Health at "/health"
health).register(// Metrics at "/metrics"
metrics).register("/greet", greetService).build();
}
use of io.helidon.metrics.MetricsSupport in project helidon by oracle.
the class Main method createRouting.
/**
* Creates new {@link Routing}.
*
* @return routing configured with JSON support, a health check, and a service
* @param config configuration of this server
*/
private static Routing createRouting(Config config) {
MetricsSupport metrics = MetricsSupport.create();
GreetService greetService = new GreetService(config);
HealthSupport health = HealthSupport.builder().addLiveness(// Adds a convenient set of checks
HealthChecks.healthChecks()).build();
return Routing.builder().register(// Health at "/health"
health).register(// Metrics at "/metrics"
metrics).register("/greet", greetService).build();
}
Aggregations