Hello everyone ,
am trying to expose Histogram Metric Family , bate i don't know the parameter of .add_metric(), specify buckets. I already doing that while Metric() and its working
class CustomCollector(object):
def __init__(self):
pass
def collect(self):
ll= [1,2,3,4,5]
#With 'Metric' - Working
metricH = Metric("a_teste", "A simple teste",'histogram')
for element in ll:
metricH.add_sample("a_teste", value=element, labels={'element':'a labels'})
yield metricH
#with Histogram - not working
h = HistogramMetricFamily("HistogramMetricFamily_teste", "HistogramMetricFamily simple teste")
h.add_metric(???????)
yield h
if __name__ == '__main__':
start_http_server(1234)
REGISTRY.register(CustomCollector())
while True:
time.sleep(1)
I need an example of how add_metric work for Histogram Metric Family, and the specificity of Metric Family in generale.
I would be grateful for anyone who will help me
thank you so much