mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
Don't double report metrics on error (#2719)
* Don't double report metrics on error When there is an error use a different function to report the metrics, in case the plugin chain handled the request the metrics are already reported. Fixes: #2717 Signed-off-by: Miek Gieben <miek@miek.nl> * Compile again Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -8,7 +8,9 @@ import (
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
// Report reports the metrics data associated with request.
|
||||
// Report reports the metrics data associated with request. This function is exported because it is also
|
||||
// called from core/dnsserver to report requests hitting the server that should not be handled and are thus
|
||||
// not sent down the plugin chain.
|
||||
func Report(server string, req request.Request, zone, rcode string, size int, start time.Time) {
|
||||
// Proto and Family.
|
||||
net := req.Proto()
|
||||
|
||||
Reference in New Issue
Block a user