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
This commit is contained in:
parent
573ad62b77
commit
08443a9f00
10 changed files with 68 additions and 56 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue