Monitoring Consumer Metrics

1. Tracking Fetch Rate

Metric Description Detail
fetch-rate Fetch requests/sec Activity
fetch-size-avg Bytes per fetch Efficiency
High Rate Small fetches Tune min.bytes

Example: Fetch rate

kafka.consumer:type=consumer-fetch-manager-metrics,client-id=app
  -> fetch-rate

2. Monitoring Records Consumed

Metric Description Detail
records-consumed-rate Records/sec Throughput
records-consumed-total Cumulative Lifetime
bytes-consumed-rate Bytes/sec Volume

Example: Records consumed

kafka.consumer:type=consumer-fetch-manager-metrics,client-id=app
  -> records-consumed-rate

3. Checking Consumer Lag

Metric Description Detail
records-lag-max Worst partition lag Key SLO
records-lag Per-partition Granular
Growing Can't keep up Scale out

Example: Lag max

kafka.consumer:type=consumer-fetch-manager-metrics,client-id=app
  -> records-lag-max

4. Monitoring Fetch Latency

Metric Description Detail
fetch-latency-avg Fetch round-trip Network+wait
fetch-latency-max Worst case Tail
High fetch.max.wait or broker Tune

Example: Fetch latency

kafka.consumer:type=consumer-fetch-manager-metrics,client-id=app
  -> fetch-latency-avg

5. Tracking Commit Rate

Metric Description Detail
commit-rate Commits/sec Frequency
commit-latency-avg Commit duration Overhead
High Rate Too frequent commits Batch more

Example: Commit rate

kafka.consumer:type=consumer-coordinator-metrics,client-id=app
  -> commit-rate

6. Monitoring Join Rate

Metric Description Detail
join-rate Group joins/sec Rebalance signal
join-time-avg Join duration Latency
High Frequent rebalances Instability

Example: Join rate

kafka.consumer:type=consumer-coordinator-metrics,client-id=app
  -> join-rate

7. Checking Sync Rate

Metric Description Detail
sync-rate Sync group calls/sec Assignment phase
sync-time-avg Sync duration Latency
Pair With join metrics Rebalance cost

Example: Sync rate

kafka.consumer:type=consumer-coordinator-metrics,client-id=app
  -> sync-rate

8. Tracking Heartbeat Response Time

Metric Description Detail
heartbeat-response-
time-max
Coordinator RTT Health
heartbeat-rate Heartbeats/sec Liveness
High Coordinator slow Risk eviction

Example: Heartbeat time

kafka.consumer:type=consumer-coordinator-metrics,client-id=app
  -> heartbeat-response-time-max

9. Monitoring Last Poll Time

Metric Description Detail
time-between-poll-avg Gap between polls Processing time
last-poll-seconds-ago Recency Stuck detection
Near max.poll Eviction risk Reduce batch

Example: Poll interval

kafka.consumer:type=consumer-metrics,client-id=app
  -> time-between-poll-avg

10. Checking Assigned Partitions

Metric Description Detail
assigned-partitions Count owned Balance check
Uneven Skewed assignment Hot consumer
Zero Idle consumer Over-provisioned

Example: Assigned partitions

kafka.consumer:type=consumer-coordinator-metrics,client-id=app
  -> assigned-partitions