Open Radrik5 opened 5 years ago
Love this idea, but since this ventures into app metrics (as the exporter library will be embedded elsewhere), platform dependencies & licensing I'd like to suggest we KISS this by only defining a bunch of callbacks to be implemented. The metrics themselves can be predefined so that they are consistent across implementations, but the actual delivery of the metric should be the task of the callbacks, which should be unimplemented & empty by default. For Unix-ish platforms it should be easy to provide a demo provider based on e.g. libstatgrab, which I've used in the past. But what really matters here is a consistent lifecycle API and setup of the counters/gauges to be exported.
Hi, I think adding process start time may not be that hard; here I've found a sample: https://github.com/ef-gy/prometheus-client-cpp/blob/master/include/prometheus/metric.h#L142 What do you think?
here is solution. @Radrik5
https://gist.github.com/day253/f4f4613c3fe855194332eebe986e50a5
Any plans for adding standard metrics like in official Go/Java/Python client libraries?
I understand it's difficult to make them in a cross-platform fashion but it would be very helpful to have them out of the box.