Class KafkaConsumerServiceStats

java.lang.Object
com.linkedin.venice.stats.AbstractVeniceStats
com.linkedin.davinci.stats.KafkaConsumerServiceStats

public class KafkaConsumerServiceStats extends AbstractVeniceStats
This class provides the stats for Kafka consumer service per region or per store. Stats inside this class can either: (1) Total only: The stat indicate total number of all the stores on this host per region. (2) Total and Per store only: The stat is registered for each store on this host.
  • Constructor Details

    • KafkaConsumerServiceStats

      public KafkaConsumerServiceStats(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName, LongSupplier getMaxElapsedTimeSinceLastPollInConsumerPool, KafkaConsumerServiceStats totalStats, Time time, String clusterName)
  • Method Details

    • recordPollRequestLatency

      public void recordPollRequestLatency(double latency)
      Joint API — records to both Tehuti (Avg, Max) and OTel (HISTOGRAM) for poll time, plus poll count.
    • recordPollResultNum

      public void recordPollResultNum(int count)
      Joint API — records to both Tehuti (Avg, Min) and OTel (MIN_MAX_COUNT_SUM).
    • recordNonZeroPollResultNum

      public void recordNonZeroPollResultNum(int count)
      Joint API — records to both Tehuti (LongAdderRateGauge) and OTel (ASYNC_COUNTER_FOR_HIGH_PERF_CASES).
    • recordConsumerRecordsProducingToWriterBufferLatency

      public void recordConsumerRecordsProducingToWriterBufferLatency(double latency)
      Joint API — records to both Tehuti (Avg, Max) and OTel (HISTOGRAM).
    • recordPollError

      public void recordPollError()
      Joint API — records to both Tehuti (OccurrenceRate) and OTel (COUNTER).
    • recordDetectedDeletedTopicNum

      public void recordDetectedDeletedTopicNum(int count)
      Joint API — records to both Tehuti (Total) and OTel (COUNTER).
    • recordDetectedNoRunningIngestionTopicPartitionNum

      public void recordDetectedNoRunningIngestionTopicPartitionNum(int count)
      Joint API — records to both Tehuti (Total) and OTel (COUNTER).
    • recordDelegateSubscribeLatency

      public void recordDelegateSubscribeLatency(double value)
      Joint API — records to both Tehuti (Avg, Max) and OTel (HISTOGRAM) with SUBSCRIBE dimension.
    • recordUpdateCurrentAssignmentLatency

      public void recordUpdateCurrentAssignmentLatency(double value)
      Joint API — records to both Tehuti (Avg, Max) and OTel (HISTOGRAM) with UPDATE_ASSIGNMENT dimension.
    • recordMinPartitionsPerConsumer

      public void recordMinPartitionsPerConsumer(int count)
    • recordMaxPartitionsPerConsumer

      public void recordMaxPartitionsPerConsumer(int count)
    • recordAvgPartitionsPerConsumer

      public void recordAvgPartitionsPerConsumer(int count)
    • recordByteSizePerPoll

      public void recordByteSizePerPoll(double count)
      Joint API — records to both Tehuti (Min, Max) and OTel (MIN_MAX_COUNT_SUM).
    • recordConsumerIdleTime

      public void recordConsumerIdleTime(double time)
      Joint API — records to both Tehuti (Max) and OTel (MIN_MAX_COUNT_SUM).
    • recordSubscribedPartitionsNum

      public void recordSubscribedPartitionsNum(int count)
    • recordPartitionAssignmentForOtel

      public void recordPartitionAssignmentForOtel(int partitionCount)
      Records a single per-consumer partition count to the OTel partition assignment histogram. Called for each consumer in the pool from KafkaConsumerService.recordPartitionsPerConsumerSensor(). Tehuti keeps 4 pre-computed gauge values; OTel records raw per-consumer values to a single MIN_MAX_COUNT_SUM histogram.