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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindTo(io.micrometer.core.instrument.MeterRegistry registry) voidclose()voidThe tags to include in the gauge.protected abstract StringAbstract method to implement with the metric prefix for the reporter.voidinit(List<KafkaMetric> metrics) voidmetricChange(KafkaMetric metric) voidmetricRemoval(KafkaMetric metric) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.common.metrics.MetricsReporter
contextChange, reconfigurableConfigs, reconfigure, validateReconfiguration
-
Field Details
-
CLIENT_ID_TAG
- See Also:
-
TOPIC_TAG
- See Also:
-
NODE_ID_TAG
- See Also:
-
-
Constructor Details
-
AbstractKafkaMetricsReporter
public AbstractKafkaMetricsReporter()
-
-
Method Details
-
bindTo
public void bindTo(@NonNull io.micrometer.core.instrument.MeterRegistry registry) - Specified by:
bindToin interfaceio.micrometer.core.instrument.binder.MeterBinder
-
init
- Specified by:
initin interfaceMetricsReporter
-
metricChange
- Specified by:
metricChangein interfaceMetricsReporter
-
metricRemoval
- Specified by:
metricRemovalin interfaceMetricsReporter
-
configure
- Specified by:
configurein interfaceConfigurable
-
close
@PreDestroy public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceMetricsReporter
-
getIncludedTags
The tags to include in the gauge. Defaults to just the client-id.- Returns:
- The tags to include
-
getMetricPrefix
Abstract method to implement with the metric prefix for the reporter.- Returns:
- prefix name
-