Class KafkaBinderMetrics
java.lang.Object
org.springframework.cloud.stream.binder.kafka.KafkaBinderMetrics
- All Implemented Interfaces:
io.micrometer.core.instrument.binder.MeterBinder,AutoCloseable,EventListener,org.springframework.context.ApplicationListener<BindingCreatedEvent>
public class KafkaBinderMetrics
extends Object
implements io.micrometer.core.instrument.binder.MeterBinder, org.springframework.context.ApplicationListener<BindingCreatedEvent>, AutoCloseable
Metrics for Kafka binder.
- Author:
- Henryk Konsek, Soby Chacko, Artem Bilan, Oleg Zhurakousky, Jon Schneider, Thomas Cheyney, Gary Russell, Lars Bilger, Tomek Szmytka, Nico Heller
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKafkaBinderMetrics(KafkaMessageChannelBinder binder, KafkaBinderConfigurationProperties binderConfigurationProperties) KafkaBinderMetrics(KafkaMessageChannelBinder binder, KafkaBinderConfigurationProperties binderConfigurationProperties, org.springframework.kafka.core.ConsumerFactory<?, ?> defaultConsumerFactory, io.micrometer.core.instrument.MeterRegistry meterRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidbindTo(io.micrometer.core.instrument.MeterRegistry registry) voidclose()voidvoidsetTimeout(int timeout)
-
Field Details
-
OFFSET_LAG_METRIC_NAME
Offset lag micrometer metric name. This can be used for meter filtering.- See Also:
-
-
Constructor Details
-
KafkaBinderMetrics
public KafkaBinderMetrics(KafkaMessageChannelBinder binder, KafkaBinderConfigurationProperties binderConfigurationProperties, org.springframework.kafka.core.ConsumerFactory<?, ?> defaultConsumerFactory, @Nullable io.micrometer.core.instrument.MeterRegistry meterRegistry) -
KafkaBinderMetrics
public KafkaBinderMetrics(KafkaMessageChannelBinder binder, KafkaBinderConfigurationProperties binderConfigurationProperties)
-
-
Method Details
-
setTimeout
public void setTimeout(int timeout) -
bindTo
public void bindTo(io.micrometer.core.instrument.MeterRegistry registry) - Specified by:
bindToin interfaceio.micrometer.core.instrument.binder.MeterBinder
-
onApplicationEvent
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<BindingCreatedEvent>
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-