metrics: Fix usage by directly using the prometheus client
This commit is contained in:
parent
83ff609001
commit
40be99464f
4
setup.go
4
setup.go
@ -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
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user