Skip to content

How to reduce the memory usage of prometheus golang client? #920

Answered by beorn7
yuyue0225sc asked this question in Q&A
Discussion options

You must be logged in to vote

There is nothing really expiring in the instrumentation library. Any metric is intentionally exposed over the lifetime of the binary. If you see the instrumentation code taking a lot of memory, perhaps you have created metric vectors with a very high cardinality. That would be the first thing to look for. If you have elements in the metric vector that only get an update once or twice and then just sit around and using up memory, you might actually have more an event logging use case.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kakkoyun
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #919 on October 08, 2021 14:50.