Skip to content

Is it possible to remove a reported metric? #177

Closed Answered by sanych-sun
tomkerkhove asked this question in Q&A
Discussion options

You must be logged in to vote

You can use Remove method of the ICollectorRegistry to remove all samples of the metric:

registry.Remove("my-metric")

Or RemoveLabelled on the metric family to remove the single sample.

Replies: 2 comments 9 replies

Comment options

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

Comment options

You must be logged in to vote
8 replies
@tomkerkhove
Comment options

@sanych-sun
Comment options

@tomkerkhove
Comment options

@phnx47
Comment options

@tomkerkhove
Comment options

Answer selected by phnx47
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