Versions Compared

Key

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

...

consumer-coordinator-metrics

A paused-partitions-count  gauge is registered in the consumer's top-level metrics gauge and paused-partitions-rate / paused-partitions-total sensors are registered at coordinator level. When queried, this gauge computes the current count of paused partitions by reading from the consumer's subscription state. Since the consumer already maintains the set of paused partitions internally, no additional data structures are needed for this metricSensor metrics are updated on each pause() call, incrementing the cumulative count and contributing to the rate calculation.

consumer-fetch-manager-metrics

The paused-partitions  and / paused-partitions-duration-seconds  gauges  gauges and paused-partitions-rate / paused-partitions-total sensors are registered per partition in the fetch manager metrics, alongside the existing per-partition lag and lead metrics. They follow the same lifecycle:

  • On partition assignment: The metrics are registered for each newly assigned partition.
  • On partition revocation: The metrics are removed for each revoked partition, preventing stale metrics from accumulating. Both Gauge metrics are implemented as on-demand gauges that read directly from the partition's pause state when queried, rather than being updated on every pause/resume call.

...

  • Verify that the pause timestamp is set when pause()  is called, cleared on resume() , and reset on partition reassignment.
  • Verify that the paused-partitions-count  metric is coordinator-level metrics are registered and returns the correct count as partitions are paused and resumed.
  • Verify that paused-partitions  and paused-partitions-duration-seconds  per-partition metrics are registered per partition, return correct values, and are removed when partitions are revoked.

...