digitalocean / prometheus-client-c

A Prometheus Client in C
Other
158 stars 78 forks source link

API to clear data(second request) #76

Open batusekerci opened 1 year ago

batusekerci commented 1 year ago

Previously, at this issue was a request for clearing data API. I repeat this request. Since, we are parsing the exported metrics from CoTurn, and we are doing this in an interval, there is a need to clear existing metrics to clear metrics history.

Or, is there another way?

fg-j commented 1 year ago

I am also dealing with this issue. In fact, the growing heap allocations from this client eventually cause my service to be out-of-memory killed.

In this flame chart showing total bytes of heap allocated for a 60 minute time window, this client allocates nearly 50% of the total bytes allocated in the time window. The allocations made by my application business logic are nearly invisible on the graph because of how negligible they are in comparison.

image

It's vital to be able to clear the heap allocated for data periodically for long-running applications.