Class HibernateQueryMetrics
java.lang.Object
io.micrometer.core.instrument.binder.jpa.HibernateQueryMetrics
- All Implemented Interfaces:
MeterBinder
@NonNullApi
@NonNullFields
@Deprecated
public class HibernateQueryMetrics
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 query metrics. It exposes
the same statistics as would be exposed when calling
Statistics.getQueryStatistics(String)
. Note that only SELECT queries are
recorded in QueryStatistics
.
Be aware of the potential for high cardinality of unique Hibernate queries executed by
your application when considering using this MeterBinder
.
- Since:
- 1.4.0
-
Constructor Summary
ConstructorDescriptionHibernateQueryMetrics
(org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags) Deprecated.Create aHibernateQueryMetrics
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
bindTo
(MeterRegistry meterRegistry) Deprecated.static void
monitor
(MeterRegistry registry, org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags) Deprecated.CreateHibernateQueryMetrics
and bind to the specified meter registry.static void
monitor
(MeterRegistry registry, org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, String... tags) Deprecated.CreateHibernateQueryMetrics
and bind to the specified meter registry.
-
Constructor Details
-
HibernateQueryMetrics
public HibernateQueryMetrics(org.hibernate.SessionFactory sessionFactory, String sessionFactoryName, Iterable<Tag> tags) Deprecated.Create aHibernateQueryMetrics
.- Parameters:
sessionFactory
- session factory to usesessionFactoryName
- session 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.CreateHibernateQueryMetrics
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.CreateHibernateQueryMetrics
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
-
bindTo
Deprecated.- Specified by:
bindTo
in interfaceMeterBinder
-