mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
middleware/metrics: export actual size (#448)
The `*_size*` metrics now export the actual packet length, not the advertised one (although that might be nice as well).
This commit is contained in:
@@ -53,7 +53,7 @@ func New(r *dns.Msg, rr *dnsrecorder.Recorder, emptyValue string) Replacer {
|
||||
rcode = strconv.Itoa(rr.Rcode)
|
||||
}
|
||||
rep.replacements["{rcode}"] = rcode
|
||||
rep.replacements["{size}"] = strconv.Itoa(rr.Size)
|
||||
rep.replacements["{size}"] = strconv.Itoa(rr.Len)
|
||||
rep.replacements["{duration}"] = time.Since(rr.Start).String()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user