@NonNullApi @NonNullFields public class TomcatMetrics extends java.lang.Object implements MeterBinder, java.lang.AutoCloseable
MeterBinder
for Tomcat.
Note: the close()
method should be called when the application shuts down
to clean up listeners this binder registers.
Constructor and Description |
---|
TomcatMetrics(org.apache.catalina.Manager manager,
java.lang.Iterable<Tag> tags) |
TomcatMetrics(org.apache.catalina.Manager manager,
java.lang.Iterable<Tag> tags,
javax.management.MBeanServer mBeanServer) |
Modifier and Type | Method and Description |
---|---|
void |
bindTo(MeterRegistry registry) |
void |
close() |
static javax.management.MBeanServer |
getMBeanServer() |
static void |
monitor(MeterRegistry registry,
org.apache.catalina.Manager manager,
java.lang.Iterable<Tag> tags) |
static void |
monitor(MeterRegistry registry,
org.apache.catalina.Manager manager,
java.lang.String... tags) |
void |
setJmxDomain(java.lang.String jmxDomain)
Set JMX domain.
|
public TomcatMetrics(@Nullable org.apache.catalina.Manager manager, java.lang.Iterable<Tag> tags)
public static void monitor(MeterRegistry registry, @Nullable org.apache.catalina.Manager manager, java.lang.String... tags)
public static void monitor(MeterRegistry registry, @Nullable org.apache.catalina.Manager manager, java.lang.Iterable<Tag> tags)
public static javax.management.MBeanServer getMBeanServer()
public void bindTo(MeterRegistry registry)
bindTo
in interface MeterBinder
public void setJmxDomain(java.lang.String jmxDomain)
jmxDomain
- JMX domain to be usedpublic void close()
close
in interface java.lang.AutoCloseable