Skip to content

Commit

Permalink
do not mutate messages
Browse files Browse the repository at this point in the history
  • Loading branch information
SHaaD94 committed Apr 29, 2024
1 parent 8784607 commit d161c6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/pdata_marshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (p pdataMetricsMarshaler) Marshal(ld pmetric.Metrics, topic string) ([]*sar
var hash = pdatautil.MapHash(resourceMetrics.Resource().Attributes())

newMetrics := pmetric.NewMetrics()
resourceMetrics.MoveTo(newMetrics.ResourceMetrics().AppendEmpty())
resourceMetrics.CopyTo(newMetrics.ResourceMetrics().AppendEmpty())

bts, err := p.marshaler.MarshalMetrics(newMetrics)
if err != nil {
Expand Down

0 comments on commit d161c6b

Please sign in to comment.