jsancio commented on a change in pull request #11133:
URL: https://github.com/apache/kafka/pull/11133#discussion_r677612215



##########
File path: core/src/main/scala/kafka/server/KafkaRaftServer.scala
##########
@@ -100,6 +101,9 @@ class KafkaRaftServer(
       controllerQuorumVotersFuture
     ))
   } else {
+    // we need to register the various kafka.controller metrics
+    // for backwards compatibility with the ZooKeeper-based case
+    new QuorumControllerMetrics(KafkaYammerMetrics.defaultRegistry())

Review comment:
       This works because the constructor of `QuorumControllerMetrics` 
registers those metrics against the Yammer registry. How about having a static 
method in `QuorumControllerMetrics` that does this and doesn't use guages since 
they are not needed?




-- 
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


Reply via email to