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

 ##########
 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:
   btw As metrics are created at boot and they don't change I expect the order 
not to change if you don't restart the server. At least for the 
DefaultMetricsProvider.
   
   
   @enixon

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