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 Summary
ConstructorDescriptionHibernateMetrics
(javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, Iterable<Tag> tags) Deprecated.since 1.1.2 in favor ofHibernateMetrics(SessionFactory, String, Iterable)
HibernateMetrics
(org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags) Deprecated.Create aHibernateMetrics
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
bindTo
(MeterRegistry registry) Deprecated.static void
monitor
(MeterRegistry registry, javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, Iterable<Tag> tags) Deprecated.since 1.1.2 in favor ofmonitor(MeterRegistry, SessionFactory, String, Iterable)
static void
monitor
(MeterRegistry registry, javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, String... tags) Deprecated.since 1.1.2 in favor ofmonitor(MeterRegistry, SessionFactory, String, String...)
static void
monitor
(MeterRegistry registry, org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags) Deprecated.CreateHibernateMetrics
and bind to the specified meter registry.static void
monitor
(MeterRegistry registry, org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, String... tags) Deprecated.CreateHibernateMetrics
and bind to the specified meter registry.
-
Constructor Details
-
HibernateMetrics
public HibernateMetrics(org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags) Deprecated.Create aHibernateMetrics
.- Parameters:
sessionFactory
- session factory to usesessionFactoryName
- session factory name as a tag valuetags
- additional tags
-
HibernateMetrics
@Deprecated public HibernateMetrics(javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, Iterable<Tag> tags) Deprecated.since 1.1.2 in favor ofHibernateMetrics(SessionFactory, String, Iterable)
Create aHibernateMetrics
.- Parameters:
entityManagerFactory
- entity manager factory to useentityManagerFactoryName
- entity manager factory name as a tag valuetags
- additional tags
-
-
Method Details
-
monitor
public static void monitor(MeterRegistry registry, org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, String... tags) Deprecated.CreateHibernateMetrics
and bind to the specified meter registry.- Parameters:
registry
- meter registry to usesessionFactory
- session factory to usesessionFactoryName
- session factory name as a tag valuetags
- additional tags
-
monitor
public static void monitor(MeterRegistry registry, org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags) Deprecated.CreateHibernateMetrics
and bind to the specified meter registry.- Parameters:
registry
- meter registry to usesessionFactory
- session factory to usesessionFactoryName
- session factory name as a tag valuetags
- additional tags
-
monitor
@Deprecated public static void monitor(MeterRegistry registry, javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, String... tags) Deprecated.since 1.1.2 in favor ofmonitor(MeterRegistry, SessionFactory, String, String...)
CreateHibernateMetrics
and bind to the specified meter registry.- Parameters:
registry
- meter registry to useentityManagerFactory
- entity manager factory to useentityManagerFactoryName
- entity manager factory name as a tag valuetags
- additional tags
-
monitor
@Deprecated public static void monitor(MeterRegistry registry, javax.persistence.EntityManagerFactory entityManagerFactory, String entityManagerFactoryName, Iterable<Tag> tags) Deprecated.since 1.1.2 in favor ofmonitor(MeterRegistry, SessionFactory, String, Iterable)
CreateHibernateMetrics
and bind to the specified meter registry.- Parameters:
registry
- meter registry to useentityManagerFactory
- entity manager factory to useentityManagerFactoryName
- entity manager factory name as a tag valuetags
- additional tags
-
bindTo
Deprecated.- Specified by:
bindTo
in interfaceMeterBinder
-