Add metrics

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-01-18 08:39:02 +01:00
parent 272823932f
commit b371eb679d
4 changed files with 27 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/metrics"
clog "github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/plugin/pkg/parse"
pkgtls "github.com/coredns/coredns/plugin/pkg/tls"
@@ -38,6 +39,7 @@ func setup(c *caddy.Controller) error {
c.OnStartup(func() error {
go t.c.Run()
metrics.MustRegister(c, xds.ClusterGauge)
return nil
})
c.OnShutdown(func() error { return t.c.Stop() })