Add function to unregister metrics from default set #12 (#13)

This commit is contained in:
Roman Khavronenko 2020-07-27 20:05:14 +01:00 committed by GitHub
parent 5edf5eaace
commit 6a144d3619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,3 +62,8 @@ func WriteProcessMetrics(w io.Writer) {
writeGoMetrics(w)
writeProcessMetrics(w)
}
// UnregisterMetric removes metric with the given name from default set.
func UnregisterMetric(name string) bool {
return defaultSet.UnregisterMetric(name)
}