aboutsummaryrefslogtreecommitdiff
path: root/plugin/metrics/handler.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-04-18 09:42:20 +0100
committerGravatar GitHub <noreply@github.com> 2018-04-18 09:42:20 +0100
commit08443a9f009fa0529a6d5cbb4708790165c16a0c (patch)
treece8af5908e61dde11c271e025175aa9704adc926 /plugin/metrics/handler.go
parent573ad62b770b7320f5499a1fc64a70b8f118e3b9 (diff)
downloadcoredns-08443a9f009fa0529a6d5cbb4708790165c16a0c.tar.gz
coredns-08443a9f009fa0529a6d5cbb4708790165c16a0c.tar.zst
coredns-08443a9f009fa0529a6d5cbb4708790165c16a0c.zip
plugin/metrics: add 'server' label (#1682)
* plugin/metrics: add 'server' label This uses the new WithServer(ctx) to get the current server from the context. First in a larger refactor to make all plugins do this. * compile * compile * lala test * compile and test * typos * Dont duplicate the code
Diffstat (limited to 'plugin/metrics/handler.go')
-rw-r--r--plugin/metrics/handler.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/metrics/handler.go b/plugin/metrics/handler.go
index 88bc1b634..1c9517bac 100644
--- a/plugin/metrics/handler.go
+++ b/plugin/metrics/handler.go
@@ -25,7 +25,7 @@ func (m *Metrics) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
rw := dnstest.NewRecorder(w)
status, err := plugin.NextOrFailure(m.Name(), m.Next, ctx, rw, r)
- vars.Report(state, zone, rcode.ToString(rw.Rcode), rw.Len, rw.Start)
+ vars.Report(ctx, state, zone, rcode.ToString(rw.Rcode), rw.Len, rw.Start)
return status, err
}