enixon commented on a change in pull request #854: ZOOKEEPER-3143 Pluggable 
metrics system for ZooKeeper - Data Collection on Server
URL: https://github.com/apache/zookeeper/pull/854#discussion_r271875371
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Commands.java
 ##########
 @@ -392,8 +392,12 @@ public CommandResponse run(ZooKeeperServer zkServer, 
Map<String, String> kwargs)
                 response.put("observer_master_id", 
((ObserverZooKeeperServer)zkServer).getObserver().getLearnerMasterId());
             }
 
-            response.putAll(ServerMetrics.getAllValues());
-
+            ServerMetrics.getMetrics()
+                    .getMetricsProvider()
+                    .dump(
+                    (metric, value) -> {
 
 Review comment:
   Is this ordered in a deterministic fashion or could values jump around 
depending on the time?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to