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-471690802 @jhuan31 I think that it is better to port all of your stuff from Facebook. I have sent this patch for you Facebook friends in order to see how the MetricsProvider system will be, and to get feedback from the community. Regarding static vs instance. For the server side we could use the static approach. problems: - You won't be able to test metrics while starting more than one server inside the same jvm - You must not cache references to the global 'metrics' object because all of the references must always access the global mutable reference, so this approach may be more error prone On the client side we can't go with the 'static' way because inside the same jvm/classloader you may have more than one client (think for instance to having a hbase client + one curator client...) so a static reference will mix metrics about different zk clusters That said if the community prefer the static approach for the server I am fine, but I think that having instance variables will ease at least maintainability of the codebase (and testability)
---------------------------------------------------------------- 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
