From 27673505619a65b5a1f63f4a3ef38ad45ddc45a8 Mon Sep 17 00:00:00 2001 From: sequix Date: Thu, 21 Jul 2022 23:14:01 +0800 Subject: [PATCH] Add function to list all metric names from default set (#29) --- metrics.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/metrics.go b/metrics.go index c28c036..57dcd3f 100644 --- a/metrics.go +++ b/metrics.go @@ -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() +}