Github user eolivelli commented on the issue: https://github.com/apache/zookeeper/pull/582 @lvfangmin > One question is are we just publishing the raw data to the external metric report system, or we need to do our aggregation to find out values like min/avg/max? > > If we need to aggregate before report, it might be useful to take a look at ZOOKEEPER-3098, which added AvgMinMaxCounter, SimpleCounter. We also added percentile counter, etc, which will be contributed later. I am aware of ZOOKEEPER-3098. In my idea it is up to the MetricsProvider to export percentiles, averages, min, max.... This is what usually Prometheus and Dropwizard Metrics do automatically, you only have to provide raw data and all aggregations are computed internally. This is very efficient and makes the application able to leverage internal provider optimizations see just as an example: https://github.com/prometheus/client_java#summary we can provide our own "simple" ZookKeeper Basic Metrics Provider which uses your Metrics utilities in ZOOKEEPER-3098, it will be only a refactor of existing code. Beside topic: I am thinking about an integration with the four letter words endpoint: In BookKeeper we have a bridge from Metrics Providers and HTTP Admin API which enables every provider to dump its state in a common text based format, we can follow a similar approach for ZK see: https://github.com/apache/bookkeeper/blob/16553057b0ddba53ac169c4fef81336e2bd26116/bookkeeper-stats/src/main/java/org/apache/bookkeeper/stats/StatsProvider.java#L45
---