Skip to content

Commit

Permalink
Fix in converter
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Aug 2, 2024
1 parent f62f033 commit c2cd3de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aggregators/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"errors"
"fmt"
"math"
"slices"
"sort"
"sync"
"time"
Expand Down Expand Up @@ -1013,7 +1014,8 @@ func marshalEventGlobalLabels(e *modelpb.APMEvent) ([]byte, error) {
}
pb.Labels[i].Key = k
pb.Labels[i].Value = v.Value
pb.Labels[i].Values = v.Values
pb.Labels[i].Values = slices.Grow(pb.Labels[i].Values, len(v.Values))[:len(v.Values)]
copy(pb.Labels[i].Values, v.Values)
}
if pb != nil {
sort.Slice(pb.Labels, func(i, j int) bool {
Expand Down Expand Up @@ -1042,7 +1044,8 @@ func marshalEventGlobalLabels(e *modelpb.APMEvent) ([]byte, error) {
}
pb.NumericLabels[i].Key = k
pb.NumericLabels[i].Value = v.Value
pb.NumericLabels[i].Values = v.Values
pb.NumericLabels[i].Values = slices.Grow(pb.NumericLabels[i].Values, len(v.Values))[:len(v.Values)]
copy(pb.NumericLabels[i].Values, v.Values)
}
if pb != nil {
sort.Slice(pb.NumericLabels, func(i, j int) bool {
Expand Down

0 comments on commit c2cd3de

Please sign in to comment.