kevin-wu24 commented on code in PR #19586: URL: https://github.com/apache/kafka/pull/19586#discussion_r2078192271
########## metadata/src/main/java/org/apache/kafka/controller/metrics/ControllerMetadataMetrics.java: ########## @@ -244,9 +312,18 @@ public void close() { ELECTION_FROM_ELIGIBLE_LEADER_REPLICAS_PER_SEC, IGNORED_STATIC_VOTERS ).forEach(r::removeMetric)); + for (int brokerId : brokerRegistrationStates.keySet()) { + removeBrokerRegistrationStateMetric(brokerId); + } } - private static MetricName getMetricName(String type, String name) { + public static MetricName getMetricName(String type, String name) { return KafkaYammerMetrics.getMetricName("kafka.controller", type, name); } + + public static MetricName getBrokerIdTagMetricName(String type, String name, int brokerId) { Review Comment: It can be package private. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org