client_python icon indicating copy to clipboard operation
client_python copied to clipboard

Observe method to SummaryMetricFamily and HistogramMetricFamily

Open aetherrootr opened this issue 3 years ago • 2 comments

Currently, when we use SummaryMetricFamily and HistogramMetricFamily, we need to implement additional statistical operations, which makes it necessary to implement some statistical methods and fill these two objects in a certain way when we need to implement the results of forwarding short life by ourselves. I would like to implement observe function for these two classes and use them just like Summary and Histogram. Is it worth it?

aetherrootr avatar Jul 01 '22 12:07 aetherrootr

Would there be an advantage to using the Family versions instead of just using Summary and Histogram directly if an observe method were to be added?

csmarchbanks avatar Jul 07 '22 16:07 csmarchbanks

In most cases this is true, but in some cases it still needs to be implemented via family. For example, in some cases I need to forward the metric of the worker node through the file (short life cycle) in the scheduler, instead of forwarding it through the pushgateway (for safety, the worker node cannot access the network even the network inside the cluster), so these methods will be more convenient

aetherrootr avatar Jul 11 '22 07:07 aetherrootr