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, address pdata changes #6137

Merged
merged 1 commit into from
Nov 4, 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
4 changes: 2 additions & 2 deletions exporter/alibabacloudlogserviceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.38.0
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector/model v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector v0.38.1-0.20211103215828-cffbecb2ac9e
go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e
go.uber.org/zap v1.19.1
)

Expand Down
8 changes: 4 additions & 4 deletions exporter/alibabacloudlogserviceexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func getComplexAttributeValueMap() pdata.AttributeValue {
mapValReal.InsertInt("code", 200)
mapValReal.InsertNull("null")
arrayVal := pdata.NewAttributeValueArray()
arrayVal.ArrayVal().AppendEmpty().SetStringVal("array")
arrayVal.SliceVal().AppendEmpty().SetStringVal("array")
mapValReal.Insert("array", arrayVal)

subMapVal := pdata.NewAttributeValueMap()
Expand Down Expand Up @@ -76,7 +76,7 @@ func createLogData(numberOfLogs int) pdata.Logs {
logRecord.Body().SetStringVal("log contents")
case 6:
arrayVal := pdata.NewAttributeValueArray()
arrayVal.ArrayVal().AppendEmpty().SetStringVal("array")
arrayVal.SliceVal().AppendEmpty().SetStringVal("array")
logRecord.Attributes().Insert("array-value", arrayVal)
logRecord.Body().SetStringVal("log contents")
default:
Expand Down
2 changes: 1 addition & 1 deletion exporter/awscloudwatchlogsexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func attrValue(value pdata.AttributeValue) interface{} {
})
return values
case pdata.AttributeValueTypeArray:
arrayVal := value.ArrayVal()
arrayVal := value.SliceVal()
values := make([]interface{}, arrayVal.Len())
for i := 0; i < arrayVal.Len(); i++ {
values[i] = attrValue(arrayVal.At(i))
Expand Down
2 changes: 1 addition & 1 deletion exporter/awscloudwatchlogsexporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func TestAttrValue(t *testing.T) {
name: "array",
builder: func() pdata.AttributeValue {
arrAttr := pdata.NewAttributeValueArray()
arr := arrAttr.ArrayVal()
arr := arrAttr.SliceVal()
for _, av := range []pdata.AttributeValue{
pdata.NewAttributeValueDouble(1.2),
pdata.NewAttributeValueDouble(1.6),
Expand Down
4 changes: 2 additions & 2 deletions exporter/awscloudwatchlogsexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.17
require (
github.com/aws/aws-sdk-go v1.41.14
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector/model v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector v0.38.1-0.20211103215828-cffbecb2ac9e
go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e
go.uber.org/zap v1.19.1
)

Expand Down
8 changes: 4 additions & 4 deletions exporter/awscloudwatchlogsexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions exporter/awsemfexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.38.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.38.0
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector/model v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector v0.38.1-0.20211103215828-cffbecb2ac9e
go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e
go.uber.org/zap v1.19.1
google.golang.org/protobuf v1.27.1
)
Expand Down
8 changes: 4 additions & 4 deletions exporter/awsemfexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions exporter/awskinesisexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.38.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.38.0
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector/model v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector v0.38.1-0.20211103215828-cffbecb2ac9e
go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e
go.uber.org/zap v1.19.1
)

Expand Down
8 changes: 4 additions & 4 deletions exporter/awskinesisexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions exporter/awsprometheusremotewriteexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/aws/aws-sdk-go v1.41.14
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.38.0
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector v0.38.1-0.20211103215828-cffbecb2ac9e
)

require (
Expand Down Expand Up @@ -35,7 +35,7 @@ require (
github.com/tidwall/tinylru v1.1.0 // indirect
github.com/tidwall/wal v0.1.6 // indirect
go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/collector/model v0.38.1-0.20211103011348-c24dfeb047a8 // indirect
go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.26.0 // indirect
go.opentelemetry.io/otel v1.1.0 // indirect
go.opentelemetry.io/otel/internal/metric v0.24.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions exporter/awsprometheusremotewriteexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions exporter/awsxrayexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.38.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.38.0
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector/model v0.38.1-0.20211103011348-c24dfeb047a8
go.opentelemetry.io/collector v0.38.1-0.20211103215828-cffbecb2ac9e
go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e
go.uber.org/zap v1.19.1
)

Expand Down
8 changes: 4 additions & 4 deletions exporter/awsxrayexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions exporter/awsxrayexporter/internal/translator/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func makeAws(attributes map[string]pdata.AttributeValue, resource pdata.Resource
taskArn string
taskFamily string
launchType string
logGroups pdata.AnyValueArray
logGroupArns pdata.AnyValueArray
logGroups pdata.AttributeValueSlice
logGroupArns pdata.AttributeValueSlice
cwl []awsxray.LogGroupMetadata
ec2 *awsxray.EC2Metadata
ecs *awsxray.ECSMetadata
Expand Down Expand Up @@ -117,9 +117,9 @@ func makeAws(attributes map[string]pdata.AttributeValue, resource pdata.Resource
case conventions.AttributeAWSECSLaunchtype:
launchType = value.StringVal()
case conventions.AttributeAWSLogGroupNames:
logGroups = value.ArrayVal()
logGroups = value.SliceVal()
case conventions.AttributeAWSLogGroupARNs:
logGroupArns = value.ArrayVal()
logGroupArns = value.SliceVal()
}
return true
})
Expand Down Expand Up @@ -204,9 +204,9 @@ func makeAws(attributes map[string]pdata.AttributeValue, resource pdata.Resource

// Since we must couple log group ARNs and Log Group Names in the same CWLogs object, we first try to derive the
// names from the ARN, then fall back to just recording the names
if logGroupArns != (pdata.AnyValueArray{}) && logGroupArns.Len() > 0 {
if logGroupArns != (pdata.AttributeValueSlice{}) && logGroupArns.Len() > 0 {
cwl = getLogGroupMetadata(logGroupArns, true)
} else if logGroups != (pdata.AnyValueArray{}) && logGroups.Len() > 0 {
} else if logGroups != (pdata.AttributeValueSlice{}) && logGroups.Len() > 0 {
cwl = getLogGroupMetadata(logGroups, false)
}

Expand Down Expand Up @@ -243,7 +243,7 @@ func makeAws(attributes map[string]pdata.AttributeValue, resource pdata.Resource

// Given an array of log group ARNs, create a corresponding amount of LogGroupMetadata objects with log_group and arn
// populated, or given an array of just log group names, create the LogGroupMetadata objects with arn omitted
func getLogGroupMetadata(logGroups pdata.AnyValueArray, isArn bool) []awsxray.LogGroupMetadata {
func getLogGroupMetadata(logGroups pdata.AttributeValueSlice, isArn bool) []awsxray.LogGroupMetadata {
var lgm []awsxray.LogGroupMetadata
for i := 0; i < logGroups.Len(); i++ {
if isArn {
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsxrayexporter/internal/translator/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func TestLogGroups(t *testing.T) {
attributes := make(map[string]pdata.AttributeValue)
resource := pdata.NewResource()
lg := pdata.NewAttributeValueArray()
ava := lg.ArrayVal()
ava := lg.SliceVal()
ava.EnsureCapacity(2)
ava.AppendEmpty().SetStringVal("group1")
ava.AppendEmpty().SetStringVal("group2")
Expand Down Expand Up @@ -394,7 +394,7 @@ func TestLogGroupsFromArns(t *testing.T) {
attributes := make(map[string]pdata.AttributeValue)
resource := pdata.NewResource()
lga := pdata.NewAttributeValueArray()
ava := lga.ArrayVal()
ava := lga.SliceVal()
ava.EnsureCapacity(2)
ava.AppendEmpty().SetStringVal(group1)
ava.AppendEmpty().SetStringVal(group2)
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsxrayexporter/internal/translator/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func metadataValue(value pdata.AttributeValue) interface{} {
})
return converted
case pdata.AttributeValueTypeArray:
arrVal := value.ArrayVal()
arrVal := value.SliceVal()
converted := make([]interface{}, arrVal.Len())
for i := 0; i < arrVal.Len(); i++ {
converted[i] = metadataValue(arrVal.At(i))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,9 +727,9 @@ func TestFilteredAttributesMetadata(t *testing.T) {
attrs.InsertNull("null_value")

arrayValue := pdata.NewAttributeValueArray()
arrayValue.ArrayVal().AppendEmpty().SetIntVal(12)
arrayValue.ArrayVal().AppendEmpty().SetIntVal(34)
arrayValue.ArrayVal().AppendEmpty().SetIntVal(56)
arrayValue.SliceVal().AppendEmpty().SetIntVal(12)
arrayValue.SliceVal().AppendEmpty().SetIntVal(34)
arrayValue.SliceVal().AppendEmpty().SetIntVal(56)
attrs.Insert("array_value", arrayValue)

mapValue := pdata.NewAttributeValueMap()
Expand Down Expand Up @@ -851,7 +851,7 @@ func constructDefaultResource() pdata.Resource {
attrs.Insert(resourceMapKey, resourceMapVal)

resourceArrayVal := pdata.NewAttributeValueArray()
resourceArray := resourceArrayVal.ArrayVal()
resourceArray := resourceArrayVal.SliceVal()
resourceArray.AppendEmpty().SetStringVal("foo")
resourceArray.AppendEmpty().SetStringVal("bar")
attrs.Insert(resourceArrayKey, resourceArrayVal)
Expand Down
Loading