Hi,
I have started drafting an API for the new Metrics system.

The idea is to design a common API to be implemented by a "Metrics
Provider".

This way we will instrument ZooKeeper code only once and the user will be
able to publish metrics to his preferred system.

This is the umbrella issue:
https://issues.apache.org/jira/browse/ZOOKEEPER-3092

This is my proposal for the initial API, it is very simple, we can add
feature as soon as we need them.
https://github.com/apache/zookeeper/pull/582
I think that we can go with comments directly on the GitHub pull request if
the overall approach looks good.

I took these sources as base:
- Prometheus Java API
- Dropwizard Metrics Java API
- Apache BookKeeper Stats Loggers API (which has  implementations both for
Prometheus and for DropWizard/Codahale)

Many other Apache libraries have their own metrics plugin system

We already have a feature request for an implementation on Prometheus.io
https://issues.apache.org/jira/browse/ZOOKEEPER-3091

Any comment is welcome !

Enrico

Reply via email to