plugin/prometheus: write rcode properly to the metrics (#5126)

* plugin/prometheus: write rcode properly to the metrics

Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
This commit is contained in:
Ondřej Benkovský
2022-01-26 17:32:01 +01:00
committed by GitHub
parent 482a20afce
commit f713a51319
2 changed files with 69 additions and 3 deletions

View File

@@ -24,7 +24,5 @@ func (r *Recorder) WriteMsg(res *dns.Msg) error {
_, r.Caller[0], _, _ = runtime.Caller(1)
_, r.Caller[1], _, _ = runtime.Caller(2)
_, r.Caller[2], _, _ = runtime.Caller(3)
r.Len += res.Len()
r.Msg = res
return r.ResponseWriter.WriteMsg(res)
return r.Recorder.WriteMsg(res)
}