aboutsummaryrefslogtreecommitdiff
path: root/plugin/autopath
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/autopath')
-rw-r--r--plugin/autopath/metrics.go4
-rw-r--r--plugin/autopath/setup.go2
2 files changed, 1 insertions, 5 deletions
diff --git a/plugin/autopath/metrics.go b/plugin/autopath/metrics.go
index c928bd2f3..ae25ab79e 100644
--- a/plugin/autopath/metrics.go
+++ b/plugin/autopath/metrics.go
@@ -1,8 +1,6 @@
package autopath
import (
- "sync"
-
"github.com/coredns/coredns/plugin"
"github.com/prometheus/client_golang/prometheus"
@@ -16,5 +14,3 @@ var (
Help: "Counter of requests that did autopath.",
}, []string{"server"})
)
-
-var once sync.Once
diff --git a/plugin/autopath/setup.go b/plugin/autopath/setup.go
index edade9d20..4dbe139ca 100644
--- a/plugin/autopath/setup.go
+++ b/plugin/autopath/setup.go
@@ -26,7 +26,7 @@ func setup(c *caddy.Controller) error {
}
c.OnStartup(func() error {
- once.Do(func() { metrics.MustRegister(c, autoPathCount) })
+ metrics.MustRegister(c, autoPathCount)
return nil
})