public class JettyStatisticsCollector extends io.prometheus.client.Collector
Server server = new Server(0);
ServletContextHandler context = new ServletContextHandler();
context.setContextPath("/");
server.setHandler(context);
HandlerCollection handlers = new HandlerCollection();
StatisticsHandler statisticsHandler = new StatisticsHandler();
statisticsHandler.setServer(server);
handlers.addHandler(statisticsHandler);
// register collector
new JettyStatisticsCollector(statisticsHandler).register();
server.setHandler(handlers);
server.start();
| Constructor and Description |
|---|
JettyStatisticsCollector(org.eclipse.jetty.server.handler.StatisticsHandler statisticsHandler) |
| Modifier and Type | Method and Description |
|---|---|
List<io.prometheus.client.Collector.MetricFamilySamples> |
collect() |
public JettyStatisticsCollector(org.eclipse.jetty.server.handler.StatisticsHandler statisticsHandler)
Copyright © 2016. All rights reserved.