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

Add secretsmanager confmap provider #1324

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 0 deletions collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.99.0
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.99.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
Expand Down Expand Up @@ -55,6 +56,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 // indirect
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect
Expand Down
4 changes: 4 additions & 0 deletions collector/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 h1:f9RyWNtS8oH7cZ
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5/go.mod h1:h5CoMZV2VF297/VLhRhO1WF+XYWOzXo+4HsObA4HjBQ=
github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 h1:6cnno47Me9bRykw9AEv9zkXE+5or7jz8TsskTTccbgc=
github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o=
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6 h1:TIOEjw0i2yyhmhRry3Oeu9YtiiHWISZ6j/irS1W3gX4=
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.6/go.mod h1:3Ba++UwWd154xtP4FRX5pUK3Gt4up5sDHCve6kVfE+g=
github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w=
github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE=
Expand Down Expand Up @@ -417,6 +419,8 @@ github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0b
github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w=
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.99.0 h1:jQ+U5v7IG9tTuCl3cNfEUEsLWelBWw/XY4UlZX0PWzc=
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.99.0/go.mod h1:/J80bgLUI1ASjMrwWEb0zHl4trx+ogz1xM8HZvsaPRk=
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.99.0 h1:w1lN0CiLVtSyaI24tmWuD5qVpGRDU0DaSA0/Dl9NhTg=
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.99.0/go.mod h1:wyZZhLDGnIIAfsS638pAn5rZ9EPDHj7a68cmNrkwugQ=
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.99.0 h1:Us+HCnULFKE0k2dN+r/K+f0c0DbKR01A4ouBPGiICY8=
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.99.0/go.mod h1:m1Ip+DxFnvfozwzSCGG4FxE5ITmjxvNg6H9qpQi61IM=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.99.0 h1:UTctoFx3O8CEPCLoFEO64HvFlzDFPHBZqsLDaUA1jqs=
Expand Down
3 changes: 2 additions & 1 deletion collector/internal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -59,7 +60,7 @@ func getConfig(logger *zap.Logger) string {
func NewCollector(logger *zap.Logger, factories otelcol.Factories, version string) *Collector {
l := logger.Named("NewCollector")
providerSettings := confmap.ProviderSettings{Logger: l}
providers := []confmap.Provider{fileprovider.NewWithSettings(providerSettings), envprovider.NewWithSettings(providerSettings), yamlprovider.NewWithSettings(providerSettings), httpprovider.NewWithSettings(providerSettings), s3provider.New()}
providers := []confmap.Provider{fileprovider.NewWithSettings(providerSettings), envprovider.NewWithSettings(providerSettings), yamlprovider.NewWithSettings(providerSettings), httpprovider.NewWithSettings(providerSettings), s3provider.New(), secretsmanagerprovider.New()}
mapProvider := make(map[string]confmap.Provider, len(providers))

for _, provider := range providers {
Expand Down
Loading