Class HibernateMetrics

java.lang.Object
io.micrometer.core.instrument.binder.jpa.HibernateMetrics
All Implemented Interfaces:
MeterBinder

@NonNullApi @NonNullFields @Deprecated public class HibernateMetrics extends Object implements MeterBinder
Deprecated.
This implementation is deprecated in favor of the MeterBinder maintained as part of the Hibernate project as of version 5.4.26. See https://mvnrepository.com/artifact/org.hibernate/hibernate-micrometer/
A MeterBinder implementation that provides Hibernate metrics. It exposes the same statistics as would be exposed when calling Statistics.logSummary().
Implementation Note:
This implementation requires Hibernate 5.3 or later.
  • Constructor Details

    • HibernateMetrics

      public HibernateMetrics(org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags)
      Deprecated.
      Create a HibernateMetrics.
      Parameters:
      sessionFactory - session factory to use
      sessionFactoryName - session factory name as a tag value
      tags - additional tags
    • HibernateMetrics

      @Deprecated public HibernateMetrics(javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, Iterable<Tag> tags)
      Deprecated.
      Create a HibernateMetrics.
      Parameters:
      entityManagerFactory - entity manager factory to use
      entityManagerFactoryName - entity manager factory name as a tag value
      tags - additional tags
  • Method Details

    • monitor

      public static void monitor(MeterRegistry registry, org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, String... tags)
      Deprecated.
      Create HibernateMetrics and bind to the specified meter registry.
      Parameters:
      registry - meter registry to use
      sessionFactory - session factory to use
      sessionFactoryName - session factory name as a tag value
      tags - additional tags
    • monitor

      public static void monitor(MeterRegistry registry, org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags)
      Deprecated.
      Create HibernateMetrics and bind to the specified meter registry.
      Parameters:
      registry - meter registry to use
      sessionFactory - session factory to use
      sessionFactoryName - session factory name as a tag value
      tags - additional tags
    • monitor

      @Deprecated public static void monitor(MeterRegistry registry, javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, String... tags)
      Create HibernateMetrics and bind to the specified meter registry.
      Parameters:
      registry - meter registry to use
      entityManagerFactory - entity manager factory to use
      entityManagerFactoryName - entity manager factory name as a tag value
      tags - additional tags
    • monitor

      @Deprecated public static void monitor(MeterRegistry registry, javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, Iterable<Tag> tags)
      Create HibernateMetrics and bind to the specified meter registry.
      Parameters:
      registry - meter registry to use
      entityManagerFactory - entity manager factory to use
      entityManagerFactoryName - entity manager factory name as a tag value
      tags - additional tags
    • bindTo

      public void bindTo(MeterRegistry registry)
      Deprecated.
      Specified by:
      bindTo in interface MeterBinder