A client metric measures the behavior, health, resource use, or traffic of a Kafka client. It helps reveal when producers, consumers, Kafka Connect, or Kafka Streams applications fall behind, exhaust memory, crash, or otherwise threaten data reliability. section 15.3.1
Client metrics are organized by client domain: producer, consumer, connect, or stream. A client ID label associates each measurement with its client; Prometheus exposes the metrics without the client-type prefix. Connection counts and authentication outcomes provide additional signals that are not specific to one client type. section 15.3.1
Use client metrics to investigate operational symptoms such as:
- Frequent changes in consumer connections, which can indicate repeated consumer-group rebalancing; consumption pauses during rebalancing and application data becomes outdated. section 15.3.1
- Failed authentications, which may indicate authentication-system problems in addition to incorrect credentials and should be investigated promptly. section 15.3.1
- Resource pressure or processing delay, where CPU, memory, or network limitations can slow clients, cause out-of-memory errors, or produce crashes. section 15.3.1
Diagnosing changing consumer connections
A consumer group whose connection count repeatedly rises and falls warrants investigation for frequent rebalancing. Because no data is consumed during a rebalance, the dependent application may process increasingly outdated data. Check consumer health and related client metrics rather than treating the connection change as an isolated network fluctuation. section 15.3.1
Client metrics complement broker monitoring: a healthy Kafka cluster still depends on clients to produce and consume data reliably. Producer errors and request latency, consumer lag and rebalances, connector health, and Streams processing duration expose problems at different points in the data path. section 15.6
