divijvaidya commented on code in PR #14133:
URL: https://github.com/apache/kafka/pull/14133#discussion_r1280395279


##########
core/src/main/java/kafka/log/remote/RemoteStorageMetrics.java:
##########
@@ -0,0 +1,53 @@
+/*
+ * 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.log.remote;
+
+import com.yammer.metrics.core.MetricName;
+import org.apache.kafka.server.metrics.KafkaYammerMetrics;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class RemoteStorageMetrics {

Review Comment:
   I was hoping that we could add all metric related to Remote Storage here 
(and validate that they aren't initialized). Metrics which are missing are the 
ones such as REMOTE_LOG_MANAGER_TASKS_AVG_IDLE_PERCENT and others which are 
only applicable if Remote Storage is turned on at system level.
   



##########
core/src/main/java/kafka/log/remote/RemoteStorageMetrics.java:
##########
@@ -0,0 +1,53 @@
+/*
+ * 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.log.remote;
+
+import com.yammer.metrics.core.MetricName;
+import org.apache.kafka.server.metrics.KafkaYammerMetrics;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class RemoteStorageMetrics {
+    final static MetricName REMOTE_BYTES_OUT_PER_SEC = getMetricName(
+            "BrokerTopicMetrics", "RemoteBytesOutPerSec");
+    final static MetricName REMOTE_BYTES_IN_PER_SEC = getMetricName(
+            "BrokerTopicMetrics", "RemoteBytesInPerSec");
+    final static MetricName REMOTE_READ_REQUESTS_PER_SEC = getMetricName(
+            "BrokerTopicMetrics", "RemoteReadRequestsPerSec");
+    final static MetricName REMOTE_WRITE_REQUESTS_PER_SEC = getMetricName(
+            "BrokerTopicMetrics", "RemoteWriteRequestsPerSec");

Review Comment:
   should we re-use constants here `BrokerTopicStats.RemoteWriteRequestsPerSec` 
(if they are available)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to