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();