Class AbstractKafkaMetrics<T extends AbstractKafkaConfiguration>

java.lang.Object
io.micronaut.configuration.kafka.metrics.AbstractKafkaMetrics<T>
Type Parameters:
T - An abstract kafka configuration
Direct Known Subclasses:
KafkaConsumerMetrics, KafkaProducerMetrics, KafkaStreamsMetrics

@Internal public abstract class AbstractKafkaMetrics<T extends AbstractKafkaConfiguration> extends Object
A class to simplify the producer and consumer metric.reporters default property.
Since:
1.0
Author:
Christian Oestreich
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected T
    addKafkaMetrics(io.micronaut.context.event.BeanCreatedEvent<T> event, String kafkaMetricsReporterClassName)
    Method to add a default metric reporter if not otherwise defined.
    protected T
    addKafkaMetrics(io.micronaut.context.event.BeanCreatedEvent<T> event, String kafkaMetricsReporterClassName, @Nullable io.micrometer.core.instrument.MeterRegistry meterRegistry)
    Method to add a default metric reporter if not otherwise defined.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractKafkaMetrics

      public AbstractKafkaMetrics()
  • Method Details

    • addKafkaMetrics

      protected T addKafkaMetrics(io.micronaut.context.event.BeanCreatedEvent<T> event, String kafkaMetricsReporterClassName)
      Method to add a default metric reporter if not otherwise defined.
      Parameters:
      event - The event for bean created of type AbstractKafkaConfiguration
      kafkaMetricsReporterClassName - The class name to use for kafka metrics registration
      Returns:
      The bean
    • addKafkaMetrics

      protected T addKafkaMetrics(io.micronaut.context.event.BeanCreatedEvent<T> event, String kafkaMetricsReporterClassName, @Nullable @Nullable io.micrometer.core.instrument.MeterRegistry meterRegistry)
      Method to add a default metric reporter if not otherwise defined.
      Parameters:
      event - The event for bean created of type AbstractKafkaConfiguration
      kafkaMetricsReporterClassName - The class name to use for kafka metrics registration
      meterRegistry - The meter registry instance to send metrics to
      Returns:
      The bean