No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
pom.xml

README.md

Jersey support for Prometheus Java Instrumentation library

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>