diff options
Diffstat (limited to 'plugin/kubernetes/setup.go')
-rw-r--r-- | plugin/kubernetes/setup.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/kubernetes/setup.go b/plugin/kubernetes/setup.go index 63d85fee9..b35d653e1 100644 --- a/plugin/kubernetes/setup.go +++ b/plugin/kubernetes/setup.go @@ -10,6 +10,7 @@ import ( "github.com/coredns/coredns/core/dnsserver" "github.com/coredns/coredns/plugin" + "github.com/coredns/coredns/plugin/metrics" "github.com/coredns/coredns/plugin/pkg/dnsutil" clog "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/plugin/pkg/parse" @@ -51,6 +52,11 @@ func setup(c *caddy.Controller) error { k.RegisterKubeCache(c) + c.OnStartup(func() error { + metrics.MustRegister(c, DnsProgrammingLatency) + return nil + }) + dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { k.Next = next return k |