You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/27 16:26:50 UTC

[GitHub] [kafka] jsancio commented on a change in pull request #11133: KAFKA-13140: KRaft brokers do not expose kafka.controller metrics

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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org