Skip to content

Commit

Permalink
[chore] use Remove instead of Delete (open-telemetry#9732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Boten authored and djaglowski committed May 10, 2022
1 parent 1aec8bd commit a8e0edf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/translator/jaeger/jaegerthrift_to_traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func jThriftSpanToInternal(span *jaeger.Span, dest ptrace.Span) {
setInternalSpanStatus(attrs, dest.Status())
if spanKindAttr, ok := attrs.Get(tracetranslator.TagSpanKind); ok {
dest.SetKind(jSpanKindToInternal(spanKindAttr.StringVal()))
attrs.Delete(tracetranslator.TagSpanKind)
attrs.Remove(tracetranslator.TagSpanKind)
}

// drop the attributes slice if all of them were replaced during translation
Expand Down Expand Up @@ -163,7 +163,7 @@ func jThriftLogsToSpanEvents(logs []*jaeger.Log, dest ptrace.SpanEventSlice) {
jThriftTagsToInternalAttributes(log.Fields, attrs)
if name, ok := attrs.Get(tracetranslator.TagMessage); ok {
event.SetName(name.StringVal())
attrs.Delete(tracetranslator.TagMessage)
attrs.Remove(tracetranslator.TagMessage)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/consumer_scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (s *consumerScraper) scrape(context.Context) (pmetric.Metrics, error) {
}
addIntGauge(ilm.Metrics(), metadata.M.KafkaConsumerGroupLag.Name(), now, labels, consumerLag)
}
labels.Delete(metadata.A.Partition)
labels.Remove(metadata.A.Partition)
addIntGauge(ilm.Metrics(), metadata.M.KafkaConsumerGroupOffsetSum.Name(), now, labels, offsetSum)
addIntGauge(ilm.Metrics(), metadata.M.KafkaConsumerGroupLagSum.Name(), now, labels, lagSum)
}
Expand Down

0 comments on commit a8e0edf

Please sign in to comment.