Skip to content

VitaNuova/jerseyexporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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>
  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages