Skip to content

Remove metric series where Label Values are no longer in use. If Label Values are Dynamic, is there a way to remove the previous labels from being reported? #1299

Answered by bwplotka
arjunbakshi245 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

Yes, you can use Reset method on all Vec* metric types (e.g. GaugeVec). There are also Delete* methods you can use. (:

BTW: However, looking on your metric, you might want to look at profiling (if interested in aggregation of performance metrics like mem/CPU per struct/ops). That's ofc depending what do you want to achieve (:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@arjunbakshi245
Comment options

Answer selected by bwplotka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants