From 59b8532a8900631eb939735f6edd79633b0428be Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Fri, 6 Dec 2024 19:34:46 +0530 Subject: [PATCH] metrics/histogram: Fixing incorrect label_name (#29492) We were incorrectly overwriting the same key - label_name. ```release-note NONE ``` --- server/enterprise/metrics/histogram.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/enterprise/metrics/histogram.go b/server/enterprise/metrics/histogram.go index bc799661356..7a10f836234 100644 --- a/server/enterprise/metrics/histogram.go +++ b/server/enterprise/metrics/histogram.go @@ -66,9 +66,7 @@ func (o *WrappedObserver) Observe(v float64) { mlog.Float("highest_bucket_value", o.buckets[len(o.buckets)-1]), } for k, v := range o.labels { - fields = append(fields, - mlog.String("label_name", k), - mlog.String("label_value", v)) + fields = append(fields, mlog.String(k, v)) } o.logger.Warn("Metric observation exceeded.", fields...) }