Skip to content

Commit

Permalink
Add KAFKA_LEADER_COUNT_METRIC back to watchPartition in LeadershipWat…
Browse files Browse the repository at this point in the history
…cher
  • Loading branch information
jeffxiang committed Nov 13, 2024
1 parent fa14866 commit 6640e51
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ private void watchPartition(TopicPartition topicPartition) {
"cluster=" + environmentProvider.clusterId(),
"broker=" + environmentProvider.brokerId()
);
MetricRegistryManager.getInstance(config.getMetricsConfiguration()).updateCounter(
topicPartition.topic(),
topicPartition.partition(),
UploaderMetrics.KAFKA_LEADER_COUNT_METRIC,
1,
"cluster=" + environmentProvider.clusterId(),
"broker=" + environmentProvider.brokerId()
);
}

private void unwatchPartition(TopicPartition topicPartition) {
Expand Down

0 comments on commit 6640e51

Please sign in to comment.