diff --git a/collector/go.mod b/collector/go.mod index ce23b13380..44ab8d6083 100644 --- a/collector/go.mod +++ b/collector/go.mod @@ -24,6 +24,7 @@ require ( github.com/golang-collections/go-datastructures v0.0.0-20150211160725-59788d5eb259 github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.102.0 + github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.102.0 github.com/open-telemetry/opentelemetry-lambda/collector/lambdacomponents v0.98.0 github.com/open-telemetry/opentelemetry-lambda/collector/lambdalifecycle v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.9.0 @@ -55,6 +56,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 // indirect + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.29.1 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 // indirect diff --git a/collector/go.sum b/collector/go.sum index db182c0a44..a0fb33f7c2 100644 --- a/collector/go.sum +++ b/collector/go.sum @@ -255,6 +255,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 h1:TE2i0A9ErH1YfR github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9/go.mod h1:9TzXX3MehQNGPwCZ3ka4CpwQsoAMWSF48/b+De9rfVM= github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 h1:UAxBuh0/8sFJk1qOkvOKewP5sWeWaTPDknbQz0ZkDm0= github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1/go.mod h1:hWjsYGjVuqCgfoveVcVFPXIWgz0aByzwaxKlN1StKcM= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.29.1 h1:NSWsFzdHN41mJ5I/DOFzxgkKSYNHQADHn7Mu+lU/AKw= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.29.1/go.mod h1:5mMk0DgUgaHlcqtN65fNyZI0ZDX3i9Cw+nwq75HKB3U= github.com/aws/aws-sdk-go-v2/service/sso v1.20.11 h1:gEYM2GSpr4YNWc6hCd5nod4+d4kd9vWIAWrmGuLdlMw= github.com/aws/aws-sdk-go-v2/service/sso v1.20.11/go.mod h1:gVvwPdPNYehHSP9Rs7q27U1EU+3Or2ZpXvzAYJNh63w= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.5 h1:iXjh3uaH3vsVcnyZX7MqCoCfcyxIrVE9iOQruRaWPrQ= @@ -417,6 +419,8 @@ github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mL github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg= github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.102.0 h1:IhXkhX9xl3zkWe+JKuzlgmSsN0esLGLHai+tjKuzrMs= github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.102.0/go.mod h1:zzrJwGGJmMcGnyjMcmiU+5gHRZfifkW5KwxNsswrZXA= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.102.0 h1:l9fWmXpK0BZwfbTKu733OFTz1soH3s70wYWl2uRabvo= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.102.0/go.mod h1:L2Y0/PMfHqJ2KcHp1igf4qxHug5UUp2kvIfAEbRpVSk= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.102.0 h1:jyFZk2+JJNp74U+KnHVw1xyWQuTEGcJjyl918Nh1Qbc= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.102.0/go.mod h1:xR0NbceSTwHMGKmFTv7M3/9nnhHBkYH/hjcRIi67cUE= github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.102.0 h1:X9cOU9eRDcVSiptZl53Rs170Upt48DMulq9qlYl5Khk= diff --git a/collector/internal/collector/collector.go b/collector/internal/collector/collector.go index 4dcbde3e8a..6c511ff32d 100644 --- a/collector/internal/collector/collector.go +++ b/collector/internal/collector/collector.go @@ -20,6 +20,7 @@ import ( "os" "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider" + "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/converter/expandconverter" @@ -60,7 +61,7 @@ func NewCollector(logger *zap.Logger, factories otelcol.Factories, version strin cfgSet := otelcol.ConfigProviderSettings{ ResolverSettings: confmap.ResolverSettings{ URIs: []string{getConfig(l)}, - ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory(), envprovider.NewFactory(), yamlprovider.NewFactory(), httpprovider.NewFactory(), s3provider.NewFactory()}, + ProviderFactories: []confmap.ProviderFactory{fileprovider.NewFactory(), envprovider.NewFactory(), yamlprovider.NewFactory(), httpprovider.NewFactory(), s3provider.NewFactory(), secretsmanagerprovider.NewFactory()}, ConverterFactories: []confmap.ConverterFactory{ expandconverter.NewFactory(), confmap.NewConverterFactory(func(set confmap.ConverterSettings) confmap.Converter {