metrics: Fix usage by directly using the prometheus client

This commit is contained in:
Björn Busse 2021-02-11 00:19:10 +01:00
parent 83ff609001
commit 40be99464f

View File

@ -9,7 +9,7 @@ import (
"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/metrics"
"github.com/prometheus/client_golang/prometheus"
clog "github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/plugin/pkg/upstream"
)
@ -42,7 +42,7 @@ func setup(c *caddy.Controller) error {
c.OnStartup(func() error {
// add plugin-global metric once
once.Do(func() {
metrics.MustRegister(c, requestCount)
prometheus.MustRegister(requestCount)
})
return nil
})