eolivelli commented on issue #840:  ZOOKEEPER-3143 Pluggable metrics system for 
ZooKeeper - Data Collection on Server
URL: https://github.com/apache/zookeeper/pull/840#issuecomment-473306003
 
 
   @lvfangmin @enixon 
   
   `As for the static vs instance of ServerMetrics, I agree in general we 
prefer instance, but since we have metrics in almost all the key components in 
ZooKeeper, it actually adds extra efforts and is more error-prone to pass 
instance around, so personally I would prefer to keep static way.`
   
   I will rework the patch in order to have a single "static" ServerMetrics 
instance.
   
   We will start with a generic no-op ServerMetrics as a default value.
   
   During the bootstrap phase of the server we will start the MetricsProvider 
and create a new instance of ServerMetrics and replace such global static 
instance.
   Every access to ServerMetrics will have to deference such static pointer, so 
the impact on existing code will be minor.
   
   
   
   

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