-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: potential metrics leak #6855
Comments
now it is dealt by |
Yes, meta side compaction group metrics are already cleaned up correctly but the compactor side are still not. |
Cleaning the labels right after a short-living instance is dropped/finished will cause the corresponding metric value to be removed before it is collected. For example, a batch task can take only 1 sec, but Prometheus may collect once every 20s. Therefore, the stale labels can only be removed after they are collected, which means we need to implement our own |
Need to call |
Describe the bug
In our system, metrics label are widely used but I nonticed that the labeled metrics are not cleaned when they become unused. There are potential metrics leak for the following metrics:
To Reproduce
No response
Expected behavior
No response
Additional context
To fix the issue, we can cache the labeled metrics
with_label_values
and doremove_label_values
when the metrics are no longer used. This has a side benefit to reduce label lookup when updating the metrics value.The text was updated successfully, but these errors were encountered: