Class FetchApiSensorBuilder

java.lang.Object
org.apache.kafka.server.metrics.AbstractSensorBuilder<org.apache.kafka.server.metrics.MetricsBuilderContext, org.apache.kafka.server.metrics.ApiSensors>
org.apache.kafka.server.metrics.ApiSensorBuilder
io.confluent.kafka.multitenant.metrics.FetchApiSensorBuilder

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.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.kafka.server.metrics.ApiSensorBuilder

    org.apache.kafka.server.metrics.ApiSensorBuilder.AbstractApiSensorCreator
  • Field Summary

    Fields inherited from class org.apache.kafka.server.metrics.ApiSensorBuilder

    EXPIRY_SECONDS
  • Constructor Summary

    Constructors
    Constructor
    Description
    FetchApiSensorBuilder(org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.server.metrics.MetricsBuilderContext context, org.apache.kafka.common.protocol.ApiKeys apiKey, io.confluent.kafka.multitenant.ZoneAlignment zoneAlignment, boolean isSupportedFFFClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.kafka.server.metrics.ApiSensors
     

    Methods inherited from class org.apache.kafka.server.metrics.ApiSensorBuilder

    addErrorSensors, getOrCreateErrorSensors

    Methods inherited from class org.apache.kafka.server.metrics.AbstractSensorBuilder

    getOrCreateSensors, getOrCreateSuffixedSensors

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FetchApiSensorBuilder

      public FetchApiSensorBuilder(org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.server.metrics.MetricsBuilderContext context, org.apache.kafka.common.protocol.ApiKeys apiKey, io.confluent.kafka.multitenant.ZoneAlignment zoneAlignment, boolean isSupportedFFFClient)
  • Method Details

    • build

      public org.apache.kafka.server.metrics.ApiSensors build()
      Overrides:
      build in class org.apache.kafka.server.metrics.ApiSensorBuilder