-
Notifications
You must be signed in to change notification settings - Fork 202
Description
This is possibly more of a question and relates to metrics-util, specifically the AtomicBucket struct and it's use in metrics-exporter-prometheus.
Is there currently any intended way of being able to limit values recorded in a bucket (histogram) either by amount of time in either the type itself or the recorder? If I'm not mistaken or fundamentally misunderstanding something, currently using a Histogram would lead to a slow (or fast, depending on the rate of metrics inserted) memory leak, leading to eventual OOM of the application. Even if I clear the histogram with every snapshot, I make the memory usage dependant on an external service polling it.
What would be the best way of going about this to enable using histograms for high rates of insertions, possibly without creating a custom recorder including types to do so?