@RequiresMetrics @Requires(property="micronaut.metrics.binders.kafka.enabled", value="true", defaultValue="true") @Context public class KafkaProducerMetrics extends Object implements BeanCreatedEventListener<AbstractKafkaConsumerConfiguration>, io.micrometer.core.instrument.binder.MeterBinder, Closeable
Modifier and Type | Class and Description |
---|---|
static class |
KafkaProducerMetrics.Reporter
A
MetricsReporter that binds metrics to micrometer. |
Constructor and Description |
---|
KafkaProducerMetrics() |
Modifier and Type | Method and Description |
---|---|
void |
bindTo(io.micrometer.core.instrument.MeterRegistry registry) |
void |
close() |
AbstractKafkaConsumerConfiguration |
onCreated(BeanCreatedEvent<AbstractKafkaConsumerConfiguration> event)
Fired when a bean is created and all
PostConstruct initialization hooks have been
called. |
public AbstractKafkaConsumerConfiguration onCreated(BeanCreatedEvent<AbstractKafkaConsumerConfiguration> event)
BeanCreatedEventListener
PostConstruct
initialization hooks have been
called.onCreated
in interface BeanCreatedEventListener<AbstractKafkaConsumerConfiguration>
event
- The bean created eventpublic void bindTo(io.micrometer.core.instrument.MeterRegistry registry)
bindTo
in interface io.micrometer.core.instrument.binder.MeterBinder
@PreDestroy public void close()
close
in interface Closeable
close
in interface AutoCloseable