This commit is contained in:
pegasko 2023-10-29 19:04:05 +03:00
parent 8d1e9e7334
commit ca40b25c5e

View file

@ -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()