use of com.amazon.dataprepper.pipeline.server.PrometheusMetricsHandler in project data-prepper by opensearch-project.
the class DataPrepperServerConfiguration method httpServer.
@Bean
public HttpServer httpServer(final HttpServerProvider httpServerProvider, final ListPipelinesHandler listPipelinesHandler, final ShutdownHandler shutdownHandler, @Autowired(required = false) @Nullable final PrometheusMeterRegistry prometheusMeterRegistry, @Autowired(required = false) @Nullable final Authenticator authenticator) {
final HttpServer server = httpServerProvider.get();
createContext(server, listPipelinesHandler, authenticator, "/list");
createContext(server, shutdownHandler, authenticator, "/shutdown");
if (prometheusMeterRegistry != null) {
final PrometheusMetricsHandler prometheusMetricsHandler = new PrometheusMetricsHandler(prometheusMeterRegistry);
createContext(server, prometheusMetricsHandler, authenticator, "/metrics/prometheus", "/metrics/sys");
}
return server;
}
Aggregations