Observe method to SummaryMetricFamily and HistogramMetricFamily
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?
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?
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