Skip to content

Commit

Permalink
Update OpenTelemetry dependencies for collector to v0.98.0 (#1268)
Browse files Browse the repository at this point in the history
* Update opentelemetry dependencies for collector to v0.98.0

* Fix unit tests
  • Loading branch information
rapphil authored Apr 22, 2024
1 parent abc6056 commit c0e3d1f
Show file tree
Hide file tree
Showing 22 changed files with 1,023 additions and 1,206 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.20.8'
go-version: '~1.21.9'
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
Expand All @@ -44,7 +44,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.20.8'
go-version: '~1.21.9'
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-layer-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.20.8'
go-version: '^1.21.9'
- name: build
run: make -C collector package GOARCH=${{ matrix.architecture }}
- uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion collector/Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fmt:
.PHONY: tidy
tidy:
rm -fr go.sum
$(GOCMD) mod tidy -compat=1.20
$(GOCMD) mod tidy -compat=1.21

.PHONY: lint
lint:
Expand Down
230 changes: 115 additions & 115 deletions collector/go.mod

Large diffs are not rendered by default.

568 changes: 241 additions & 327 deletions collector/go.sum

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions collector/internal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/open-telemetry/opentelemetry-lambda/collector/internal/confmap/converter/disablequeuedretryconverter"
"github.com/open-telemetry/opentelemetry-lambda/collector/internal/confmap/converter/decoupleafterbatchconverter"
"github.com/open-telemetry/opentelemetry-lambda/collector/internal/confmap/converter/disablequeuedretryconverter"
)

// Collector runs a single otelcol as a go routine within the
Expand All @@ -58,18 +58,21 @@ func getConfig(logger *zap.Logger) string {

func NewCollector(logger *zap.Logger, factories otelcol.Factories, version string) *Collector {
l := logger.Named("NewCollector")
providers := []confmap.Provider{fileprovider.New(), envprovider.New(), yamlprovider.New(), httpprovider.New(), s3provider.New()}
providerSettings := confmap.ProviderSettings{Logger: l}
providers := []confmap.Provider{fileprovider.NewWithSettings(providerSettings), envprovider.NewWithSettings(providerSettings), yamlprovider.NewWithSettings(providerSettings), httpprovider.NewWithSettings(providerSettings), s3provider.New()}
mapProvider := make(map[string]confmap.Provider, len(providers))

for _, provider := range providers {
mapProvider[provider.Scheme()] = provider
}

converterSettings := confmap.ConverterSettings{}

cfgSet := otelcol.ConfigProviderSettings{
ResolverSettings: confmap.ResolverSettings{
URIs: []string{getConfig(l)},
Providers: mapProvider,
Converters: []confmap.Converter{expandconverter.New(), disablequeuedretryconverter.New(), decoupleafterbatchconverter.New()},
Converters: []confmap.Converter{expandconverter.New(converterSettings), disablequeuedretryconverter.New(), decoupleafterbatchconverter.New()},
},
}
cfgProvider, err := otelcol.NewConfigProvider(cfgSet)
Expand Down
219 changes: 109 additions & 110 deletions collector/lambdacomponents/go.mod

Large diffs are not rendered by default.

551 changes: 233 additions & 318 deletions collector/lambdacomponents/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion collector/lambdalifecycle/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/open-telemetry/opentelemetry-lambda/collector/lambdalifecycle

go 1.20
go 1.21
2 changes: 1 addition & 1 deletion collector/processor/coldstartprocessor/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (

func NewFactory() processor.Factory {
return processor.NewFactory(
typeStr,
component.MustNewType(typeStr),
createDefaultConfig,
processor.WithTraces(createTracesProcessor, stability),
)
Expand Down
2 changes: 1 addition & 1 deletion collector/processor/coldstartprocessor/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestNewFactory(t *testing.T) {
desc: "creates a new factory with correct type",
testFunc: func(t *testing.T) {
factory := NewFactory()
require.EqualValues(t, typeStr, factory.Type())
require.EqualValues(t, typeStr, factory.Type().String())
},
},
{
Expand Down
58 changes: 34 additions & 24 deletions collector/processor/coldstartprocessor/go.mod
Original file line number Diff line number Diff line change
@@ -1,47 +1,57 @@
module github.com/open-telemetry/opentelemetry-lambda/collector/processor/coldstartprocessor

go 1.20
go 1.21

require (
github.com/cespare/xxhash v1.1.0
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/component v0.91.0
go.opentelemetry.io/collector/consumer v0.91.0
go.opentelemetry.io/collector/pdata v1.0.0
go.opentelemetry.io/collector/processor v0.91.0
go.opentelemetry.io/collector/semconv v0.91.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.98.0
go.opentelemetry.io/collector/consumer v0.98.0
go.opentelemetry.io/collector/pdata v1.5.0
go.opentelemetry.io/collector/processor v0.98.0
go.opentelemetry.io/collector/semconv v0.98.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.26.0
go.uber.org/zap v1.27.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
github.com/knadh/koanf/providers/confmap v0.1.0 // indirect
github.com/knadh/koanf/v2 v2.0.1 // indirect
github.com/knadh/koanf/v2 v2.1.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector v0.91.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.91.0 // indirect
go.opentelemetry.io/collector/confmap v0.91.0 // indirect
go.opentelemetry.io/collector/featuregate v1.0.0 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.15.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
go.opentelemetry.io/collector v0.98.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.98.0 // indirect
go.opentelemetry.io/collector/confmap v0.98.0 // indirect
go.opentelemetry.io/collector/pdata/testdata v0.98.0 // indirect
go.opentelemetry.io/otel v1.25.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.47.0 // indirect
go.opentelemetry.io/otel/metric v1.25.0 // indirect
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect
go.opentelemetry.io/otel/trace v1.25.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit c0e3d1f

Please sign in to comment.