Skip to content

Commit

Permalink
update otel core (#8821)
Browse files Browse the repository at this point in the history
* update otel core

Follow up to open-telemetry/opentelemetry-collector#5066:
  Rename `Array` type of `pdata.Value` to `Slice`
  - Deprecate `pdata.AttributeValueTypeArray` type in favor of `pdata.ValueTypeSlice`
  - Deprecate `pdata.NewAttributeValueArray` func in favor of `pdata.NewValueSlice`

* fix lint
  • Loading branch information
Alex Boten authored Mar 24, 2022
1 parent a748f6e commit 15cae21
Show file tree
Hide file tree
Showing 350 changed files with 972 additions and 1,297 deletions.
4 changes: 2 additions & 2 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib v0.47.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.47.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector/model v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector v0.47.1-0.20220323200141-1b7618728835
go.opentelemetry.io/collector/model v0.47.1-0.20220323200141-1b7618728835
go.uber.org/multierr v1.8.0
golang.org/x/mod v0.5.1
)
Expand Down
6 changes: 4 additions & 2 deletions cmd/configschema/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 cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
github.com/go-playground/universal-translator v0.18.0
github.com/go-playground/validator/v10 v10.10.1
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector/model v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector v0.47.1-0.20220323200141-1b7618728835
go.opentelemetry.io/collector/model v0.47.1-0.20220323200141-1b7618728835
)

require (
Expand Down
8 changes: 4 additions & 4 deletions cmd/mdatagen/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 cmd/mdatagen/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/go-playground/validator/v10"
"github.com/go-playground/validator/v10/non-standard/validators"
en_translations "github.com/go-playground/validator/v10/translations/en"
"go.opentelemetry.io/collector/config/configmapprovider"
"go.opentelemetry.io/collector/config/mapprovider/filemapprovider"
)

type metricName string
Expand Down Expand Up @@ -120,7 +120,7 @@ type templateContext struct {
}

func loadMetadata(filePath string) (metadata, error) {
cp, err := configmapprovider.NewFile().Retrieve(context.Background(), "file:"+filePath, nil)
cp, err := filemapprovider.New().Retrieve(context.Background(), "file:"+filePath, nil)
if err != nil {
return metadata{}, err
}
Expand Down
5 changes: 2 additions & 3 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.47.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector/model v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector v0.47.1-0.20220323200141-1b7618728835
go.opentelemetry.io/collector/model v0.47.1-0.20220323200141-1b7618728835
go.uber.org/zap v1.21.0
)

Expand All @@ -20,7 +20,6 @@ require (
github.com/go-logfmt/logfmt v0.5.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/knadh/koanf v1.4.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand Down
10 changes: 4 additions & 6 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 @@ -33,7 +33,7 @@ func getComplexAttributeValueMap() pdata.Value {
mapValReal.InsertDouble("value", 1.3)
mapValReal.InsertInt("code", 200)
mapValReal.InsertNull("null")
arrayVal := pdata.NewValueArray()
arrayVal := pdata.NewValueSlice()
arrayVal.SliceVal().AppendEmpty().SetStringVal("array")
mapValReal.Insert("array", arrayVal)

Expand Down Expand Up @@ -75,7 +75,7 @@ func createLogData(numberOfLogs int) pdata.Logs {
logRecord.Attributes().Insert("map-value", getComplexAttributeValueMap())
logRecord.Body().SetStringVal("log contents")
case 6:
arrayVal := pdata.NewValueArray()
arrayVal := pdata.NewValueSlice()
arrayVal.SliceVal().AppendEmpty().SetStringVal("array")
logRecord.Attributes().Insert("array-value", arrayVal)
logRecord.Body().SetStringVal("log contents")
Expand Down
2 changes: 1 addition & 1 deletion exporter/awscloudwatchlogsexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func attrValue(value pdata.Value) interface{} {
return true
})
return values
case pdata.ValueTypeArray:
case pdata.ValueTypeSlice:
arrayVal := value.SliceVal()
values := make([]interface{}, arrayVal.Len())
for i := 0; i < arrayVal.Len(); 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 @@ -203,7 +203,7 @@ func TestAttrValue(t *testing.T) {
{
name: "array",
builder: func() pdata.Value {
arrAttr := pdata.NewValueArray()
arrAttr := pdata.NewValueSlice()
arr := arrAttr.SliceVal()
for _, av := range []pdata.Value{
pdata.NewValueDouble(1.2),
Expand Down
5 changes: 2 additions & 3 deletions exporter/awscloudwatchlogsexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.47.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.47.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector/model v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector v0.47.1-0.20220323200141-1b7618728835
go.opentelemetry.io/collector/model v0.47.1-0.20220323200141-1b7618728835
go.uber.org/zap v1.21.0
)

Expand All @@ -19,7 +19,6 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/knadh/koanf v1.4.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand Down
10 changes: 4 additions & 6 deletions exporter/awscloudwatchlogsexporter/go.sum

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

5 changes: 2 additions & 3 deletions exporter/awsemfexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.47.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.47.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector/model v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector v0.47.1-0.20220323200141-1b7618728835
go.opentelemetry.io/collector/model v0.47.1-0.20220323200141-1b7618728835
go.uber.org/zap v1.21.0
google.golang.org/protobuf v1.27.1
)
Expand All @@ -27,7 +27,6 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/knadh/koanf v1.4.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand Down
10 changes: 4 additions & 6 deletions exporter/awsemfexporter/go.sum

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

5 changes: 2 additions & 3 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.47.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.47.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector/model v0.47.1-0.20220322153344-4c3b824aca1d
go.opentelemetry.io/collector v0.47.1-0.20220323200141-1b7618728835
go.opentelemetry.io/collector/model v0.47.1-0.20220323200141-1b7618728835
go.uber.org/zap v1.21.0
)

Expand All @@ -26,7 +26,6 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/knadh/koanf v1.4.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand Down
Loading

0 comments on commit 15cae21

Please sign in to comment.