Class TomcatMetrics
java.lang.Object
io.micrometer.core.instrument.binder.tomcat.TomcatMetrics
- All Implemented Interfaces:
MeterBinder
,AutoCloseable
@NonNullApi
@NonNullFields
public class TomcatMetrics
extends Object
implements MeterBinder, AutoCloseable
MeterBinder
for Tomcat.
Note: the close()
method should be called when the application shuts down to
clean up listeners this binder registers.
-
Constructor Summary
ConstructorDescriptionTomcatMetrics
(org.apache.catalina.Manager manager, Iterable<Tag> tags) TomcatMetrics
(org.apache.catalina.Manager manager, Iterable<Tag> tags, MBeanServer mBeanServer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
bindTo
(MeterRegistry registry) void
close()
static MBeanServer
static void
monitor
(MeterRegistry registry, org.apache.catalina.Manager manager, Iterable<Tag> tags) static void
monitor
(MeterRegistry registry, org.apache.catalina.Manager manager, String... tags) void
setJmxDomain
(String jmxDomain) Set JMX domain.
-
Constructor Details
-
TomcatMetrics
-
TomcatMetrics
public TomcatMetrics(@Nullable org.apache.catalina.Manager manager, Iterable<Tag> tags, MBeanServer mBeanServer)
-
-
Method Details
-
monitor
public static void monitor(MeterRegistry registry, @Nullable org.apache.catalina.Manager manager, String... tags) -
monitor
public static void monitor(MeterRegistry registry, @Nullable org.apache.catalina.Manager manager, Iterable<Tag> tags) -
getMBeanServer
-
bindTo
- Specified by:
bindTo
in interfaceMeterBinder
-
setJmxDomain
Set JMX domain. If unset, default values will be used as follows:- Embedded Tomcat: "Tomcat"
- Standalone Tomcat: "Catalina"
- Parameters:
jmxDomain
- JMX domain to be used- Since:
- 1.0.11
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-