metrics: Fix usage by directly using the prometheus client
This commit is contained in:
parent
83ff609001
commit
40be99464f
1 changed files with 2 additions and 2 deletions
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…
Add table
Add a link
Reference in a new issue