redpanda-data / redpanda

Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM!
https://redpanda.com
9.46k stars 579 forks source link

Refined leadership changed metrics #19873

Closed mmaslankaprv closed 3 months ago

mmaslankaprv commented 3 months ago

Previously the leadership changed metric was incremented every time a group leader was updated with the new leader or the leader was currently unknown. Technically the change from leader to no leader is a leadership change but it was confusing to users.

Change the metric updates to only account the changes when leader is present. This way after each successful leader election the metric is incremented by one on all partition replicas.

Backports Required

Release Notes

Improvements

mmaslankaprv commented 3 months ago

/ci-repeat 1

mmaslankaprv commented 3 months ago

unrelated ci failure: https://github.com/redpanda-data/redpanda/issues/18810

vbotbuildovich commented 3 months ago

/backport v24.1.x

vbotbuildovich commented 3 months ago

/backport v23.3.x