Package io.prometheus.client.jetty
Class JettyStatisticsCollector
- java.lang.Object
-
- io.prometheus.client.Collector
-
- io.prometheus.client.jetty.JettyStatisticsCollector
-
public class JettyStatisticsCollector extends io.prometheus.client.Collector
Collect metrics from jetty's org.eclipse.jetty.server.handler.StatisticsHandler.Server server = new Server(8080); 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 Summary
Constructors Constructor Description JettyStatisticsCollector(org.eclipse.jetty.server.handler.StatisticsHandler statisticsHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<io.prometheus.client.Collector.MetricFamilySamples>collect()
-
-
-
Constructor Detail
-
JettyStatisticsCollector
public JettyStatisticsCollector(org.eclipse.jetty.server.handler.StatisticsHandler statisticsHandler)
-
-