@NonNullApi @NonNullFields public class HibernateMetrics extends Object implements io.micrometer.core.instrument.binder.MeterBinder
MeterBinder
implementation that provides Hibernate metrics. It exposes the
same statistics as would be exposed when calling Statistics.logSummary()
.Constructor and Description |
---|
HibernateMetrics(SessionFactory sessionFactory,
String sessionFactoryName,
Iterable<io.micrometer.core.instrument.Tag> tags)
Create a
HibernateMetrics . |
Modifier and Type | Method and Description |
---|---|
void |
bindTo(io.micrometer.core.instrument.MeterRegistry registry) |
static void |
monitor(io.micrometer.core.instrument.MeterRegistry registry,
SessionFactory sessionFactory,
String sessionFactoryName,
Iterable<io.micrometer.core.instrument.Tag> tags)
Create
HibernateMetrics and bind to the specified meter registry. |
static void |
monitor(io.micrometer.core.instrument.MeterRegistry registry,
SessionFactory sessionFactory,
String sessionFactoryName,
String... tags)
Create
HibernateMetrics and bind to the specified meter registry. |
public HibernateMetrics(SessionFactory sessionFactory, String sessionFactoryName, Iterable<io.micrometer.core.instrument.Tag> tags)
HibernateMetrics
.sessionFactory
- session factory to usesessionFactoryName
- session factory name as a tag valuetags
- additional tagspublic static void monitor(io.micrometer.core.instrument.MeterRegistry registry, SessionFactory sessionFactory, String sessionFactoryName, String... tags)
HibernateMetrics
and bind to the specified meter registry.registry
- meter registry to usesessionFactory
- session factory to usesessionFactoryName
- session factory name as a tag valuetags
- additional tagspublic static void monitor(io.micrometer.core.instrument.MeterRegistry registry, SessionFactory sessionFactory, String sessionFactoryName, Iterable<io.micrometer.core.instrument.Tag> tags)
HibernateMetrics
and bind to the specified meter registry.registry
- meter registry to usesessionFactory
- session factory to usesessionFactoryName
- session factory name as a tag valuetags
- additional tagspublic void bindTo(io.micrometer.core.instrument.MeterRegistry registry)
bindTo
in interface io.micrometer.core.instrument.binder.MeterBinder
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.