diff options
Diffstat (limited to 'plugin/metrics/vars/report.go')
-rw-r--r-- | plugin/metrics/vars/report.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/metrics/vars/report.go b/plugin/metrics/vars/report.go index 77ed281f2..b0a9950ce 100644 --- a/plugin/metrics/vars/report.go +++ b/plugin/metrics/vars/report.go @@ -21,7 +21,6 @@ func Report(server string, req request.Request, zone, rcode string, size int, st typ := req.QType() RequestCount.WithLabelValues(server, zone, net, fam).Inc() - RequestDuration.WithLabelValues(server, zone).Observe(time.Since(start).Seconds()) if req.Do() { RequestDo.WithLabelValues(server, zone).Inc() @@ -29,8 +28,10 @@ func Report(server string, req request.Request, zone, rcode string, size int, st if _, known := monitorType[typ]; known { RequestType.WithLabelValues(server, zone, dns.Type(typ).String()).Inc() + RequestDuration.WithLabelValues(server, zone, dns.Type(typ).String()).Observe(time.Since(start).Seconds()) } else { RequestType.WithLabelValues(server, zone, other).Inc() + RequestDuration.WithLabelValues(server, zone, other).Observe(time.Since(start).Seconds()) } ResponseSize.WithLabelValues(server, zone, net).Observe(float64(size)) |