diff options
Diffstat (limited to 'middleware/prometheus/handler.go')
-rw-r--r-- | middleware/prometheus/handler.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/middleware/prometheus/handler.go b/middleware/prometheus/handler.go index a0cfcc872..3c07cd942 100644 --- a/middleware/prometheus/handler.go +++ b/middleware/prometheus/handler.go @@ -25,9 +25,9 @@ func (m *Metrics) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg status, err := m.Next.ServeDNS(ctx, rw, r) requestCount.WithLabelValues(zone, qtype).Inc() - requestDuration.WithLabelValues(zone).Observe(float64(time.Since(rw.Start()) / time.Second)) - responseSize.WithLabelValues(zone).Observe(float64(rw.Size())) - responseRcode.WithLabelValues(zone, strconv.Itoa(rw.Rcode())).Inc() + requestDuration.WithLabelValues(zone, qtype).Observe(float64(time.Since(rw.Start()) / time.Second)) + responseSize.WithLabelValues(zone, qtype).Observe(float64(rw.Size())) + responseRcode.WithLabelValues(zone, strconv.Itoa(rw.Rcode()), qtype).Inc() return status, err } |