Class LogbackMetrics

java.lang.Object
io.micrometer.core.instrument.binder.logging.LogbackMetrics
All Implemented Interfaces:
MeterBinder, AutoCloseable

@NonNullApi @NonNullFields public class LogbackMetrics extends Object implements MeterBinder, AutoCloseable
  • Constructor Details

    • LogbackMetrics

      public LogbackMetrics()
    • LogbackMetrics

      public LogbackMetrics(Iterable<Tag> tags)
    • LogbackMetrics

      public LogbackMetrics(Iterable<Tag> tags, ch.qos.logback.classic.LoggerContext context)
  • Method Details

    • bindTo

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

      public static void ignoreMetrics(Runnable r)
      Used by Counter.increment() implementations that may cause a logback logging event to occur. Attempting to instrument that implementation would cause a StackOverflowError.
      Parameters:
      r - Don't record metrics on logging statements that occur inside of this runnable.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable