This is Jersey exporter for Prometheus Java instrumentation library https://github.com/prometheus/client_java.
This exporter can be used to collect metrics from Jersey framework (inside GlassFish/Payara server).
Usage example:
new JerseyStatisticsCollector(monitoringStatistics).register();Monitoring statistics object can be injected into JavaEE application like this:
@Inject private MonitoringStatistics monitoringStatistics;In order for exporter to work, statistics collection has to be enabled in the ResourceConfig subclass:
properties.put(ServerProperties.MONITORING_STATISTICS_ENABLED, true);Analogously in web.xml:
<init-param> <param-name>jersey.config.server.monitoring.statistics.enabled</param-name> <param-value>true</param-value> </init-param>