Skip to content

Commit

Permalink
metrics/histogram: Fixing incorrect label_name (mattermost#29492)
Browse files Browse the repository at this point in the history
We were incorrectly overwriting the same key - label_name.
```release-note
NONE
```
  • Loading branch information
agnivade authored Dec 6, 2024
1 parent a90f19d commit 59b8532
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions server/enterprise/metrics/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
}
Expand Down

0 comments on commit 59b8532

Please sign in to comment.