Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update core to latest, fixes after ForEach to Range renaming #3146

Merged
merged 2 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426
go.uber.org/zap v1.16.0
gopkg.in/ini.v1 v1.57.0 // indirect
)
4 changes: 2 additions & 2 deletions exporter/alibabacloudlogserviceexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1 h1:im/wS07j2iXzv6750t/LwGqkMZnl3LsgpjTKq/EM5OM=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426 h1:zRLbXWqHQyZjX613Lfz58CPVf5uZBGxH8l2v6AhHuJo=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ func resourceToLogContents(resource pdata.Resource) []*sls.LogContent {
}

fields := map[string]interface{}{}
attrs.ForEach(func(k string, v pdata.AttributeValue) {
attrs.Range(func(k string, v pdata.AttributeValue) bool {
if k == conventions.AttributeServiceName || k == conventions.AttributeHostName {
return
return true
}
fields[k] = tracetranslator.AttributeValueToString(v, false)
return true
})
attributeBuffer, _ := json.Marshal(fields)
logContents[2] = &sls.LogContent{
Expand Down Expand Up @@ -159,8 +160,9 @@ func mapLogRecordToLogService(lr pdata.LogRecord,
})

fields := map[string]interface{}{}
lr.Attributes().ForEach(func(k string, v pdata.AttributeValue) {
lr.Attributes().Range(func(k string, v pdata.AttributeValue) bool {
fields[k] = tracetranslator.AttributeValueToString(v, false)
return true
})
attributeBuffer, _ := json.Marshal(fields)
contentsBuffer = append(contentsBuffer, sls.LogContent{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ func min(l, r int) int {

func resourceToMetricLabels(labels *KeyValues, resource pdata.Resource) {
attrs := resource.Attributes()
attrs.ForEach(func(k string, v pdata.AttributeValue) {
attrs.Range(func(k string, v pdata.AttributeValue) bool {
labels.keyValues = append(labels.keyValues, KeyValue{
Key: k,
Value: tracetranslator.AttributeValueToString(v, false),
})
return true
})
}

Expand All @@ -176,8 +177,9 @@ func intMetricsToLogs(name string, data pdata.IntDataPointSlice, defaultLabels K
dataPoint := data.At(i)
labelsMap := dataPoint.LabelsMap()
labels := defaultLabels.Clone()
labelsMap.ForEach(func(k string, v string) {
labelsMap.Range(func(k string, v string) bool {
labels.Append(k, v)
return true
})
logs = append(logs, newMetricLogFromRaw(name,
labels,
Expand All @@ -192,8 +194,9 @@ func doubleMetricsToLogs(name string, data pdata.DoubleDataPointSlice, defaultLa
dataPoint := data.At(i)
labelsMap := dataPoint.LabelsMap()
labels := defaultLabels.Clone()
labelsMap.ForEach(func(k string, v string) {
labelsMap.Range(func(k string, v string) bool {
labels.Append(k, v)
return true
})
logs = append(logs, newMetricLogFromRaw(name,
labels,
Expand All @@ -208,8 +211,9 @@ func intHistogramMetricsToLogs(name string, data pdata.IntHistogramDataPointSlic
dataPoint := data.At(i)
labelsMap := dataPoint.LabelsMap()
labels := defaultLabels.Clone()
labelsMap.ForEach(func(k string, v string) {
labelsMap.Range(func(k string, v string) bool {
labels.Append(k, v)
return true
})
logs = append(logs, newMetricLogFromRaw(name+"_sum",
labels,
Expand Down Expand Up @@ -255,8 +259,9 @@ func doubleHistogramMetricsToLogs(name string, data pdata.HistogramDataPointSlic
dataPoint := data.At(i)
labelsMap := dataPoint.LabelsMap()
labels := defaultLabels.Clone()
labelsMap.ForEach(func(k string, v string) {
labelsMap.Range(func(k string, v string) bool {
labels.Append(k, v)
return true
})
logs = append(logs, newMetricLogFromRaw(name+"_sum",
labels,
Expand Down Expand Up @@ -302,8 +307,9 @@ func doubleSummaryMetricsToLogs(name string, data pdata.SummaryDataPointSlice, d
dataPoint := data.At(i)
labelsMap := dataPoint.LabelsMap()
labels := defaultLabels.Clone()
labelsMap.ForEach(func(k string, v string) {
labelsMap.Range(func(k string, v string) bool {
labels.Append(k, v)
return true
})
logs = append(logs, newMetricLogFromRaw(name+"_sum",
labels,
Expand Down
3 changes: 2 additions & 1 deletion exporter/awsemfexporter/datapoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ func (dps SummaryDataPointSlice) At(i int) DataPoint {
// and optionally adds in the OTel instrumentation library name
func createLabels(labelsMap pdata.StringMap, instrLibName string) map[string]string {
labels := make(map[string]string, labelsMap.Len()+1)
labelsMap.ForEach(func(k, v string) {
labelsMap.Range(func(k, v string) bool {
labels[k] = v
return true
})

// Add OTel instrumentation lib name as an additional label if it is defined
Expand Down
3 changes: 2 additions & 1 deletion exporter/awsemfexporter/emf_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ func (emf *emfExporter) pushMetricsData(_ context.Context, md pdata.Metrics) err
rm := rms.At(i)
am := rm.Resource().Attributes()
if am.Len() > 0 {
am.ForEach(func(k string, v pdata.AttributeValue) {
am.Range(func(k string, v pdata.AttributeValue) bool {
labels[k] = v.StringVal()
return true
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/google/uuid v1.2.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426
go.uber.org/zap v1.16.0
google.golang.org/protobuf v1.26.0
)
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsemfexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1 h1:im/wS07j2iXzv6750t/LwGqkMZnl3LsgpjTKq/EM5OM=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426 h1:zRLbXWqHQyZjX613Lfz58CPVf5uZBGxH8l2v6AhHuJo=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/otel v0.19.0 h1:Lenfy7QHRXPZVsw/12CWpxX6d/JkrX8wrx2vO8G80Ng=
go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg=
go.opentelemetry.io/otel/metric v0.19.0/go.mod h1:8f9fglJPRnXuskQmKpnad31lcLJ2VmNNqIsx/uIwBSc=
Expand Down
2 changes: 1 addition & 1 deletion exporter/awskinesisexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/signalfx/opencensus-go-exporter-kinesis v0.6.3
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426
go.uber.org/zap v1.16.0
gopkg.in/ini.v1 v1.57.0 // indirect
)
4 changes: 2 additions & 2 deletions exporter/awskinesisexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1 h1:im/wS07j2iXzv6750t/LwGqkMZnl3LsgpjTKq/EM5OM=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426 h1:zRLbXWqHQyZjX613Lfz58CPVf5uZBGxH8l2v6AhHuJo=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsprometheusremotewriteexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/onsi/gomega v1.10.2 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426
go.uber.org/zap v1.16.0
gopkg.in/ini.v1 v1.57.0 // indirect
)
4 changes: 2 additions & 2 deletions exporter/awsprometheusremotewriteexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1 h1:im/wS07j2iXzv6750t/LwGqkMZnl3LsgpjTKq/EM5OM=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426 h1:zRLbXWqHQyZjX613Lfz58CPVf5uZBGxH8l2v6AhHuJo=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsxrayexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.0.0-00010101000000-000000000000
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426
go.uber.org/zap v1.16.0
golang.org/x/net v0.0.0-20210119194325-5f4716e94777
gopkg.in/ini.v1 v1.57.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsxrayexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1 h1:im/wS07j2iXzv6750t/LwGqkMZnl3LsgpjTKq/EM5OM=
go.opentelemetry.io/collector v0.24.1-0.20210415171520-9ff58cbcbdb1/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426 h1:zRLbXWqHQyZjX613Lfz58CPVf5uZBGxH8l2v6AhHuJo=
go.opentelemetry.io/collector v0.24.1-0.20210415212744-f6074afdb426/go.mod h1:hXpdip0pVo+lISHAzPtu13QIRHgqC1zZ/4EdgoEC0fc=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
3 changes: 2 additions & 1 deletion exporter/awsxrayexporter/translator/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func makeAws(attributes map[string]string, resource pdata.Resource) (map[string]
)

filtered := make(map[string]string)
resource.Attributes().ForEach(func(key string, value pdata.AttributeValue) {
resource.Attributes().Range(func(key string, value pdata.AttributeValue) bool {
switch key {
case semconventions.AttributeCloudProvider:
cloud = value.StringVal()
Expand Down Expand Up @@ -132,6 +132,7 @@ func makeAws(attributes map[string]string, resource pdata.Resource) (map[string]
case awsLogGroupArns:
logGroupArns = value.ArrayVal()
}
return true
})

for key, value := range attributes {
Expand Down
3 changes: 2 additions & 1 deletion exporter/awsxrayexporter/translator/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func makeHTTP(span pdata.Span) (map[string]string, *awsxray.HTTPData) {
hasHTTP := false
hasHTTPRequestURLAttributes := false

span.Attributes().ForEach(func(key string, value pdata.AttributeValue) {
span.Attributes().Range(func(key string, value pdata.AttributeValue) bool {
switch key {
case semconventions.AttributeHTTPMethod:
info.Request.Method = awsxray.String(value.StringVal())
Expand Down Expand Up @@ -103,6 +103,7 @@ func makeHTTP(span pdata.Span) (map[string]string, *awsxray.HTTPData) {
default:
filtered[key] = value.StringVal()
}
return true
})

if !hasHTTP {
Expand Down
6 changes: 4 additions & 2 deletions exporter/awsxrayexporter/translator/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func makeXRayAttributes(attributes map[string]string, resource pdata.Resource, s
}

if storeResource {
resource.Attributes().ForEach(func(key string, value pdata.AttributeValue) {
resource.Attributes().Range(func(key string, value pdata.AttributeValue) bool {
key = "otel.resource." + key
annoVal := annotationValue(value)
indexed := indexAllAttrs || indexedKeys[key]
Expand All @@ -363,6 +363,7 @@ func makeXRayAttributes(attributes map[string]string, resource pdata.Resource, s
defaultMetadata[key] = metaVal
}
}
return true
})
}

Expand Down Expand Up @@ -415,8 +416,9 @@ func metadataValue(value pdata.AttributeValue) interface{} {
return value.BoolVal()
case pdata.AttributeValueMAP:
converted := map[string]interface{}{}
value.MapVal().ForEach(func(key string, value pdata.AttributeValue) {
value.MapVal().Range(func(key string, value pdata.AttributeValue) bool {
converted[key] = metadataValue(value)
return true
})
return converted
case pdata.AttributeValueARRAY:
Expand Down
16 changes: 11 additions & 5 deletions exporter/azuremonitorexporter/conventions.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type NetworkAttributes struct {
}

// MapAttribute attempts to map a Span attribute to one of the known types
func (attrs *NetworkAttributes) MapAttribute(k string, v pdata.AttributeValue) {
func (attrs *NetworkAttributes) MapAttribute(k string, v pdata.AttributeValue) bool {
switch k {
case conventions.AttributeNetTransport:
attrs.NetTransport = v.StringVal()
Expand All @@ -66,6 +66,7 @@ func (attrs *NetworkAttributes) MapAttribute(k string, v pdata.AttributeValue) {
case conventions.AttributeNetHostName:
attrs.NetHostName = v.StringVal()
}
return true
}

// HTTPAttributes is the set of known attributes for HTTP Spans
Expand Down Expand Up @@ -97,7 +98,7 @@ type HTTPAttributes struct {
}

// MapAttribute attempts to map a Span attribute to one of the known types
func (attrs *HTTPAttributes) MapAttribute(k string, v pdata.AttributeValue) {
func (attrs *HTTPAttributes) MapAttribute(k string, v pdata.AttributeValue) bool {
switch k {
case conventions.AttributeHTTPMethod:
attrs.HTTPMethod = v.StringVal()
Expand Down Expand Up @@ -146,6 +147,8 @@ func (attrs *HTTPAttributes) MapAttribute(k string, v pdata.AttributeValue) {
default:
attrs.NetworkAttributes.MapAttribute(k, v)
}

return true
}

// RPCAttributes is the set of known attributes for RPC Spans
Expand All @@ -158,7 +161,7 @@ type RPCAttributes struct {
}

// MapAttribute attempts to map a Span attribute to one of the known types
func (attrs *RPCAttributes) MapAttribute(k string, v pdata.AttributeValue) {
func (attrs *RPCAttributes) MapAttribute(k string, v pdata.AttributeValue) bool {
switch k {
case conventions.AttributeRPCSystem:
attrs.RPCSystem = v.StringVal()
Expand All @@ -172,6 +175,7 @@ func (attrs *RPCAttributes) MapAttribute(k string, v pdata.AttributeValue) {
default:
attrs.NetworkAttributes.MapAttribute(k, v)
}
return true
}

// DatabaseAttributes is the set of known attributes for Database Spans
Expand All @@ -192,7 +196,7 @@ type DatabaseAttributes struct {
}

// MapAttribute attempts to map a Span attribute to one of the known types
func (attrs *DatabaseAttributes) MapAttribute(k string, v pdata.AttributeValue) {
func (attrs *DatabaseAttributes) MapAttribute(k string, v pdata.AttributeValue) bool {
switch k {
case conventions.AttributeDBSystem:
attrs.DBSystem = v.StringVal()
Expand Down Expand Up @@ -220,6 +224,7 @@ func (attrs *DatabaseAttributes) MapAttribute(k string, v pdata.AttributeValue)
default:
attrs.NetworkAttributes.MapAttribute(k, v)
}
return true
}

// MessagingAttributes is the set of known attributes for Messaging Spans
Expand All @@ -240,7 +245,7 @@ type MessagingAttributes struct {
}

// MapAttribute attempts to map a Span attribute to one of the known types
func (attrs *MessagingAttributes) MapAttribute(k string, v pdata.AttributeValue) {
func (attrs *MessagingAttributes) MapAttribute(k string, v pdata.AttributeValue) bool {
switch k {
case conventions.AttributeMessagingSystem:
attrs.MessagingSystem = v.StringVal()
Expand Down Expand Up @@ -274,6 +279,7 @@ func (attrs *MessagingAttributes) MapAttribute(k string, v pdata.AttributeValue)
default:
attrs.NetworkAttributes.MapAttribute(k, v)
}
return true
}

// Tries to return the value of the attribute as an int64
Expand Down
Loading