Add function to list all metric names from default set (#29)

This commit is contained in:
sequix 2022-07-21 23:14:01 +08:00 committed by GitHub
parent 6cf96d45a0
commit 2767350561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,3 +110,8 @@ func WriteFDMetrics(w io.Writer) {
func UnregisterMetric(name string) bool {
return defaultSet.UnregisterMetric(name)
}
// ListMetricNames returns a list of all the metric names from default set.
func ListMetricNames() []string {
return defaultSet.ListMetricNames()
}