plugin/proxy: for duration metrics (#1323)

The README.md was updated by not the actual metric.

Fixes #1321
This commit is contained in:
Miek Gieben 2017-12-20 23:25:43 +00:00 committed by John Belamaric
parent 4dd40a292c
commit a8ba24fff9

View file

@ -102,7 +102,7 @@ func (p Proxy) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
if backendErr == nil {
w.WriteMsg(reply)
RequestDuration.WithLabelValues(state.Proto(), upstream.Exchanger().Protocol(), familyToString(state.Family()), host.Name).Observe(float64(time.Since(start) / time.Millisecond))
RequestDuration.WithLabelValues(state.Proto(), upstream.Exchanger().Protocol(), familyToString(state.Family()), host.Name).Observe(time.Since(start).Seconds())
return 0, taperr
}