Skip to content

Commit

Permalink
initialize new structs, instead of cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
dmathieu committed Aug 25, 2023
1 parent 7f99f84 commit b0a8bc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/telemetry/metric_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ func (e *MetricExporter) Export(ctx context.Context, rm *metricdata.ResourceMetr
}
event.Metricset = &modelpb.Metricset{Samples: metrs, Name: "app"}
if ms.attributes.Len() > 0 {
event.Labels = modelpb.Labels(event.Labels).Clone()
event.NumericLabels = modelpb.NumericLabels(event.NumericLabels).Clone()
event.Labels = modelpb.Labels{}
event.NumericLabels = modelpb.NumericLabels{}

iter := ms.attributes.Iter()
for iter.Next() {
Expand Down

0 comments on commit b0a8bc9

Please sign in to comment.