Skip to content

Commit

Permalink
don't copy bytes in exemplar.Collect
Browse files Browse the repository at this point in the history
  • Loading branch information
grcevski committed Jan 9, 2025
1 parent 14b874e commit 76da265
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/metric/exemplar/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ func newStorage(n int) *storage {
func (r *storage) Collect(dest *[]Exemplar) {
*dest = reset(*dest, len(r.store), len(r.store))
var n int
for _, m := range r.store {
for i := range r.store {
m := &r.store[i]
if !m.valid {
continue
}
Expand Down

0 comments on commit 76da265

Please sign in to comment.