VictoriaMetrics/metrics

Add `Unregister` method for metrics

Opened this issue · 3 comments

aierui commented

Hi @hagen1778
What should be the best practice for removing a metric that contains multiple tags?

eg.

metrics_name1{tag1="v1",tag2="v2"} 1
metrics_name1{tag1="v3",tag2="v4"} 1
metrics_name1{tag1="v5",tag2="v6"} 1
metrics_name1{tag1="v7",tag2="v8"} 1
....

Hi @aierui!
So far while this FR isn't completed, the best way to unregister a specific metric would be the following:

metrics.UnregisterMetric('metrics_name1{tag1="v1",tag2="v2"}')
aierui commented

Thank you for your reply.