public class FetchApiSensorBuilder
extends org.apache.kafka.server.metrics.ApiSensorBuilder
With Fetch From Follower in cloud, consumers can fetch from the closest replica. FetchApiSensorBuilder is used
to track an estimate of how much egress is from same-AZ and cross-AZ. Also, the sensors is used to track how much
egress is from mis-configured clients (client.rack is not set correctly).
Using "zone" instead of "rack" to conform to cloud terminology.
Fetch response byte metrics (response-byte-total/rate) contain a zone-alignment tag to identify whether:
1. A fetch request was made to a broker in the same zone; client.rack == broker.rack (SAME_ZONE)
2. client.rack is empty or is unknown to the cluster (UNKNOWN)
3. client.rack is known, but the fetch request was sent to a broker in a different rack (CROSS_ZONE)
see io.confluent.kafka.multitenant.ZoneAlignment
UNKNOWN does not apply to the case where a consumer's client.rack is set to a valid rack but the consumer is
running in a different rack (zone). This case will be handled separately.
Only Fetch API response byte sensors contain this tag. Fetch (request byte, response time, error) metrics
do not have this tag nor do any other API sensors.