diff --git a/dnsstat.go b/dnsstat.go index 259adb7..6fdf238 100644 --- a/dnsstat.go +++ b/dnsstat.go @@ -2,16 +2,11 @@ package dnsstat import ( "context" - "fmt" - "io" - "os" "github.com/coredns/caddy" "github.com/coredns/coredns/core/dnsserver" "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/replacer" - "github.com/coredns/coredns/request" + "github.com/coredns/coredns/plugin/metrics" "github.com/miekg/dns" ) @@ -39,7 +34,6 @@ func setup(c *caddy.Controller) error { // ServeDNS implements the plugin.Handler interface. func (d DNSStat) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} // Metric increment requestCount.WithLabelValues(metrics.WithServer(ctx)).Inc()