-
Notifications
You must be signed in to change notification settings - Fork 840
Closed
Description
When using a histogram metrics we can use the 'observe' method to evaluate which bucket our latest sample will fall in:
E.g.
h1.labels('device-1').observe(value.get('latest_sample'))
->
for i, bound in enumerate(self._upper_bounds):
if amount <= bound:
self._buckets[i].inc(1)
break
However as I am proxying metrics I believe I should be using a Customer Collector and the HistogramMetricFamily which only provides add_metric which seems to just populate all the buckets.
am I supposed to calculate the buckets in my code before writing the metric?
Metadata
Metadata
Assignees
Labels
No labels