Skip to content

merge Prometheus metrics for removed user to avoid having to recompute metrics from scratch everytime #4813

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

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

roystchiang
Copy link
Contributor

Signed-off-by: Roy Chiang [email protected]

What this PR does:

When a user is removed, instead of keeping the registry in memory, we now merge all the gathered metrics. This helps to avoid the build up of registries(memory leak), and speeds up the computation of metrics.

Which issue(s) this PR fixes:
Fixes #4451

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

…e metrics from scratch everytime

Signed-off-by: Roy Chiang <[email protected]>
@roystchiang roystchiang force-pushed the attemp-to-fix-leak-v2 branch 2 times, most recently from 46f0266 to 4676f74 Compare August 4, 2022 19:42
Signed-off-by: Roy Chiang <[email protected]>
@roystchiang roystchiang force-pushed the attemp-to-fix-leak-v2 branch from 4676f74 to 148c1e7 Compare August 4, 2022 19:55
@alvinlin123 alvinlin123 merged commit 362e902 into cortexproject:master Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential memory leak on store-gateway metrics
3 participants