Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ApiKeyScope of errorRequest:Errors Mapping
UpdateMetadatarequest1:1
ControlledShutdownrequest1:1
FindCoordinatorrequest1:1
JoinGrouprequest1:1
Heartbeatrequest1:1
LeaveGrouprequest1:1
SyncGrouprequest1:1
ListGroupsrequest1:1
SaslHandshakerequest1:1
ApiVersionsrequest1:1
InitProducerIdrequest1:1
AddOffsetsToTxnrequest1:1
EndTxnrequest1:1
DescribeAclsrequest1:1
Producepartition1:n
Fetchpartition1:n
Offsetspartition1:n
OffsetCommitpartition1:n
OffsetFetchpartition1:n
DeleteRecordspartition1:n
OffsetForLeaderEpochpartition1:n
AddPartitionsToTxnpartition1:n
WriteTxnMarkerspartition1:n
TxnOffsetCommitpartition1:n
LeaderAndIsrpartition + request1:n
StopReplicapartition + request1:n
Metadatatopic1:n
CreateTopicstopic1:n
DeleteTopicstopic1:n
DescribeGroupsgroup1:n
CreateAclsacl1:n
DeleteAclsacl1:n
DescribeConfigsresource1:n
AlterConfigsresource1:n

 

Fetch down conversion rate and time

Down conversions are expensive since the whole response has to be read into memory for conversion. It will be useful to monitor the rate of down conversion and the time spent on conversions.

This Fetch down conversion rate will be a meter in the same group as existing topic metrics TotalFetchRequestsPerSec etc.

MBean: kafka.server:type=BrokerTopicMetrics,name=FetchDownConversionsPerSec,topic=([-.\w]+)

It will also be useful to know the time taken for down conversions. Fetch down conversion time will be a histogram in the same group.

MBean: kafka.server:type=BrokerTopicMetrics,name=FetchDownConversionsTimeMs,topic=([-.\w]+)

Message batch size

Large messages can cause GC issues in the broker, especially if down conversions are required. Maximum message batch size can be configured per topic to control this, but that is the size after compression. Since the batches are decompressed to validate produce requests and for fetch downconversion, it will be useful to have topic metrics for produce message batch size.

Topic metrics will be added for produce message batch size before and after decompression. The two sizes will give an indication of compression ratio as well. These two metrics will be histograms.

 

MBean: kafka.server:type=BrokerTopicMetrics,name=ProduceBatchSize,topic=([-.\w]+)

MBean: kafka.server:type=BrokerTopicMetrics,name=ProduceUncompressedBatchSize,topic=([-.\w]+)

Authentication success and failure rates

Rate of failed authentications are useful to identify misconfigured or malicious connection attempts. Successful connection rates may also be helpful for each listener.

These metrics will be Kafka metrics added to the same group as network metrics like connection-creation-rate.

MBean: kafka.server:type=socket-server-metrics,listener=<listenerName>,networkProcessor=<processorIndex>

New attributes:

  1. successful-authentication-rate
  2. failed-authentication-rate

ZooKeeper latency

It will be good to monitor latency of ZooKeeper requests so that any issues with ZooKeeper communication can be detected early.

...