junrao commented on code in PR #14621:
URL: https://github.com/apache/kafka/pull/14621#discussion_r1379120392


##########
core/src/main/java/kafka/server/ClientMetricsManager.java:
##########
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package kafka.server;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.util.Properties;
+
+/**
+ * Handles client telemetry metrics requests/responses, subscriptions and 
instance information.
+ */
+public class ClientMetricsManager implements Closeable {
+
+    private static final Logger log = 
LoggerFactory.getLogger(ClientMetricsManager.class);
+    private static final ClientMetricsManager INSTANCE = new 
ClientMetricsManager();
+
+    public static ClientMetricsManager getInstance() {

Review Comment:
   We don't use getters. So this could just be `instance`. Ditto for 
`getDefaultProperties` in `ClientMetricsTestUtils`.



##########
clients/src/main/java/org/apache/kafka/clients/admin/ConfigEntry.java:
##########
@@ -222,6 +222,7 @@ public enum ConfigSource {
         DYNAMIC_BROKER_LOGGER_CONFIG,   // dynamic broker logger config that 
is configured for a specific broker
         DYNAMIC_BROKER_CONFIG,          // dynamic broker config that is 
configured for a specific broker
         DYNAMIC_DEFAULT_BROKER_CONFIG,  // dynamic broker config that is 
configured as default for all brokers in the cluster
+        DYNAMIC_CLIENT_METRICS_CONFIG,  // dynamic client metrics subscription 
config that is configured for all clients

Review Comment:
   It seems weird to put `CLIENT_METRICS` here. The rest of the entries all 
seem to be topic config related. Other entity types like user, client, etc are 
not listed here. Ditto for the change in `DescribeConfigsResponse` and 
`ConfigResource`. 



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