diff options
author | 2016-04-05 10:53:23 +0100 | |
---|---|---|
committer | 2016-04-05 10:53:23 +0100 | |
commit | c961acbb6e9e06279d3dca077ba47d8a6170da20 (patch) | |
tree | 8cbcb55515965a94d3fb0395a7d54e7e4e84c2a0 /middleware/prometheus/handler.go | |
parent | 20e16491ec7495adc07aef7d506463f15a2b6733 (diff) | |
download | coredns-c961acbb6e9e06279d3dca077ba47d8a6170da20.tar.gz coredns-c961acbb6e9e06279d3dca077ba47d8a6170da20.tar.zst coredns-c961acbb6e9e06279d3dca077ba47d8a6170da20.zip |
Add complete secondary support
Respond to notifies and allow a secondary to follow the SOA parameters
to update a zone from a primary. Also sprinkle it with logging.
Also extend monitoring to include qtype in more metrics.
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 } |