Class AbstractKafkaMetricsReporter

java.lang.Object
io.micronaut.configuration.kafka.metrics.AbstractKafkaMetricsReporter
All Implemented Interfaces:
io.micrometer.core.instrument.binder.MeterBinder, Closeable, AutoCloseable, Configurable, MetricsReporter, Reconfigurable
Direct Known Subclasses:
ConsumerKafkaMetricsReporter, KafkaStreamsMetricsReporter, ProducerKafkaMetricsReporter

@Internal public abstract class AbstractKafkaMetricsReporter extends Object implements MetricsReporter, io.micrometer.core.instrument.binder.MeterBinder, Closeable
A MetricsReporter that binds metrics to micrometer.
  • Field Details

  • Constructor Details

    • AbstractKafkaMetricsReporter

      public AbstractKafkaMetricsReporter()
  • Method Details

    • bindTo

      public void bindTo(@NonNull io.micrometer.core.instrument.MeterRegistry registry)
      Specified by:
      bindTo in interface io.micrometer.core.instrument.binder.MeterBinder
    • init

      public void init(List<KafkaMetric> metrics)
      Specified by:
      init in interface MetricsReporter
    • metricChange

      public void metricChange(KafkaMetric metric)
      Specified by:
      metricChange in interface MetricsReporter
    • metricRemoval

      public void metricRemoval(KafkaMetric metric)
      Specified by:
      metricRemoval in interface MetricsReporter
    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface Configurable
    • close

      @PreDestroy public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface MetricsReporter
    • getIncludedTags

      protected Set<String> getIncludedTags()
      The tags to include in the gauge. Defaults to just the client-id.
      Returns:
      The tags to include
    • getMetricPrefix

      protected abstract String getMetricPrefix()
      Abstract method to implement with the metric prefix for the reporter.
      Returns:
      prefix name