aboutsummaryrefslogtreecommitdiff
path: root/plugin/proxy
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-12-20 23:25:43 +0000
committerGravatar John Belamaric <jbelamaric@infoblox.com> 2017-12-20 18:25:43 -0500
commita8ba24fff924d6206f2e24ba843d059018bc6dd0 (patch)
treebce8bc96010e4f6feec07247f01006ed9f9fcf55 /plugin/proxy
parent4dd40a292c773aad5eee761940840de64ba9090a (diff)
downloadcoredns-a8ba24fff924d6206f2e24ba843d059018bc6dd0.tar.gz
coredns-a8ba24fff924d6206f2e24ba843d059018bc6dd0.tar.zst
coredns-a8ba24fff924d6206f2e24ba843d059018bc6dd0.zip
plugin/proxy: for duration metrics (#1323)
The README.md was updated by not the actual metric. Fixes #1321
Diffstat (limited to 'plugin/proxy')
-rw-r--r--plugin/proxy/proxy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/proxy/proxy.go b/plugin/proxy/proxy.go
index c62e2aec3..a5df0b95c 100644
--- a/plugin/proxy/proxy.go
+++ b/plugin/proxy/proxy.go
@@ -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
}