merlimat commented on a change in pull request #507: Add zk-stats 
instrumentation to get zk-client stats
URL: https://github.com/apache/incubator-pulsar/pull/507#discussion_r126551777
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
 ##########
 @@ -189,6 +190,10 @@ public BrokerService(PulsarService pulsar) throws 
Exception {
 
         this.multiLayerTopicsMap = new ConcurrentOpenHashMap<>();
         this.pulsarStats = new PulsarStats(pulsar);
+        // register listener to capture zk-latency
+        ClientCnxnAspect.addListner((eventType, latencyMs) -> {
+            this.pulsarStats.recordZkLatencyTimeValue(eventType, latencyMs);
 
 Review comment:
   We should also record fractions of Millis, since the `getData()` operations 
are going to be in the order of 0.1 to 0.5 millis most of the time
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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