Skip to content

Commit 658fd0b

Browse files
committed
metrics: Simplify the label for dns and url errors to a single string for lower cardinality and better reproducibility in tests
1 parent 5eb13f1 commit 658fd0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/s3/s3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,11 @@ func errorToMetricsLabel(err error) string {
592592
}
593593
var dnsErr *net.DNSError
594594
if errors.As(err, &dnsErr) {
595-
return dnsErr.Error()
595+
return "DNSError"
596596
}
597597
var urlErr *url.Error
598598
if errors.As(err, &urlErr) {
599-
return urlErr.Err.Error()
599+
return "URLError"
600600
}
601601
errRes := minio.ToErrorResponse(err)
602602
if errRes.Code != "" {

0 commit comments

Comments
 (0)