prometheus-client-c
prometheus-client-c copied to clipboard
Is it possible to open new API to clear data?
After run prometheus client for a long time, the memory keep eating up.
It would be better if I could simply call a api to flush all the collected data.
Is it possible or any better solution to prevent out of memory trouble?
There is not. Based on the test coverage that exists currently, there are no memory leaks; we maintain a suite of tests that check for these in CI. However, that doesn't necessarily mean there is not a possible memory leak in places where the library is not tested. I believe the best path forward it to improve the test coverage such that we can prove with absolute certainty that no leaks exists. Until then, please be diligent about using tools like Valgrind to determine where your memory issues might exist.
Sorry for my bad description.
I think this it not memory leak issue. The memory keep eating up just because there is no way to clear the data and the memory would ultimately run out.
Or is there any memory control mechanism inside the library ?
What will happen if I keep add metrics data ?
When I read the prometheus documentation, I could set the expiration time or max storage size to prevent the memory or disk full issue.
That's why I ask for exposing a API to clear the data.
Actually I came from this issue https://github.com/coturn/coturn/issues/666
Sorry for my bad description. I think this it not memory leak issue. The memory keep eating up just because there is no way to clear the data and the memory would ultimately run out. Or is there any memory control mechanism inside the library ? What will happen if I keep add metrics data ?
When I read the prometheus documentation, I could set the expiration time or max storage size to prevent the memory or disk full issue. That's why I ask for exposing a API to clear the data.
Actually I came from this issue coturn/coturn#666
Could you please explain, how did you solve this issue?