Complete metrics overview (as of all patches applied)¶
All metrics carry the appender tag, reflecting the Logback appender name ("unnamed" if not set). Plus, optionally, the common tags the operator passed to the KafkaAppenderMetricsBinding constructor.
Registered by the appender's own binder (no resilience4j-micrometer needed; micrometer-core suffices). The metric names and tags match those of TaggedCircuitBreakerMetrics 1:1, extended by the appender tag and the common tags — so multiple KafkaAppender instances no longer collide on the same registry:
Metric
Tags
Type
resilience4j.circuitbreaker.state
appender, name, state
Gauge: 1 if the breaker is in this state, otherwise 0
resilience4j.circuitbreaker.calls
appender, name, kind
Timer per call outcome (successful, failed, ignored)
resilience4j.circuitbreaker.not.permitted.calls
appender, name, kind
Counter (kind=not_permitted): calls rejected by the open breaker
resilience4j.circuitbreaker.buffered.calls
appender, name, kind
Gauge: currently in the sliding window
resilience4j.circuitbreaker.slow.calls
appender, name, kind
Gauge: slow calls in the sliding window
resilience4j.circuitbreaker.failure.rate
appender, name
Gauge: current failure rate in percent
resilience4j.circuitbreaker.slow.call.rate
appender, name
Gauge: current slow-call share in percent
name values correspond to the active topic classes:
kafka-appender-audit
kafka-appender-functional
kafka-appender-technical
kafka-appender-performance
Kafka producer bridge (when KafkaClientMetrics is on the classpath)¶
Activated automatically via reflection when io.micrometer.core.instrument.binder.kafka.KafkaClientMetrics is available. One binding per active TopicClass:
Metric prefix
Examples
kafka.producer.record.send.total
Records the producer accepted
kafka.producer.record.error.total
Records that failed
kafka.producer.record.size.avg
Average record size
kafka.producer.batch.size.avg
Average batch size
kafka.producer.request.latency.avg
Average request latency to brokers
kafka.producer.outgoing.byte.rate
Bytes/second to the cluster
kafka.producer.buffer.available.bytes
Free buffer bytes
…
(~40 producer-internal metrics in total)
All carry the topic.class tag to disambiguate between the per-class producers.
# Throughput per topic classrate(kafka_appender_events_accepted_total[1m])# Loss rate broken down by reasonrate(kafka_appender_events_fallback_total[1m])# p99 send latencyhistogram_quantile(0.99,rate(kafka_appender_send_duration_seconds_bucket[5m]))# Fallback queue saturation as a ratiokafka_appender_fallback_queue_size/kafka_appender_fallback_queue_capacity# Actual data loss (= dropped events)rate(kafka_appender_fallback_dropped_total[5m])# Circuit breaker stateresilience4j_circuitbreaker_state{name=~"kafka-appender-.*"}