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 Details

    • TomcatMetrics

      public TomcatMetrics(@Nullable org.apache.catalina.Manager manager, Iterable<Tag> tags)
    • 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

      public static MBeanServer getMBeanServer()
    • bindTo

      public void bindTo(MeterRegistry registry)
      Specified by:
      bindTo in interface MeterBinder
    • setJmxDomain

      public void setJmxDomain(String jmxDomain)
      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 interface AutoCloseable