EclipseLink support for Prometheus Java Instrumentation library
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 committed eclipselink exporter Jun 25, 2018
.gitignore committed eclipselink exporter Jun 25, 2018
README.md
pom.xml committed eclipselink exporter Jun 25, 2018

README.md

EclipseLink support for Prometheus Java Instrumentation library

This is EclipseLink exporter for Prometheus Java instrumentation library. It follows the same pattern as the Hibernate exporter from the Prometheus Java Instrumentation library https://github.com/prometheus/client_java.

This exporter can be used to collect metrics from one or more EclipseLink Session instances.

Usage example for a single session:

 new EclipseLinkStatisticsCollector(session, "name").register();
 
Usage example for multiple sessions:
 new EclipseLinkStatisticsCollector()
     .add(session1, "name1")
     .add(session2, "name2")
     .register();
 
Session instance can be obtained from EntityManager instance like this:
 Session session = ((JpaEntityManager)entityManager.getDelegate()).getSession();