Open yzh44yzh opened 1 year ago
https://github.com/beam-telemetry/telemetry_metrics_prometheus_core/blob/main/lib/core/aggregator.ex#L17 this is where data are removed from table. If nobody calls Aggregator.aggregate/3, data are never removed.
There are a couple of ways to solve this problem. Some of those have been discussed here: https://github.com/beam-telemetry/telemetry_metrics_prometheus_core/issues/41.
In short, you will probably need to set up a GenServer cron job that regularly aggregates the ETS data.
Ok, thank you. As for me, I've replaced this lib with prometheus_ex.
Hi. We are using your library in our project, and consider it helpful. Thank you.
However, we found a memory leak. If nobody ever asks for metrics through API, ETS dist table is never clean up.
We've got 1Gb of data and 3M of records in dist table before noticing it.