From b0a9cc5e69a49ab0183da1d687d6b0b0af0bdf11 Mon Sep 17 00:00:00 2001 From: Sam Hazlehurst Date: Thu, 24 Oct 2024 11:36:50 -0400 Subject: [PATCH] feat: Add AES confmap provider (#1927) Add AES confmap provider --- collector/settings.go | 3 +++ go.mod | 6 ++++-- go.sum | 10 ++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/collector/settings.go b/collector/settings.go index 86e9adb35..065766f82 100644 --- a/collector/settings.go +++ b/collector/settings.go @@ -17,6 +17,7 @@ package collector import ( "os" + "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/aesprovider" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/provider/envprovider" @@ -24,6 +25,7 @@ import ( "go.opentelemetry.io/collector/confmap/provider/httpsprovider" "go.opentelemetry.io/collector/confmap/provider/yamlprovider" "go.opentelemetry.io/collector/otelcol" + "go.uber.org/zap" ) @@ -45,6 +47,7 @@ func NewSettings(configPaths []string, version string, loggingOpts []zap.Option, envprovider.NewFactory(), yamlprovider.NewFactory(), httpsprovider.NewFactory(), + aesprovider.NewFactory(), }, ConverterFactories: []confmap.ConverterFactory{}, DefaultScheme: "env", diff --git a/go.mod b/go.mod index 9fa0a4ff0..752242b10 100644 --- a/go.mod +++ b/go.mod @@ -167,7 +167,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.111.0 - go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/confmap v1.18.0 go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0 go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0 go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.17.0 @@ -199,6 +199,8 @@ require ( gopkg.in/yaml.v3 v3.0.1 ) +require github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/aesprovider v0.112.0 + require ( cel.dev/expr v0.16.0 // indirect cloud.google.com/go/auth v0.9.8 // indirect @@ -321,7 +323,7 @@ require ( github.com/go-faster/errors v0.7.1 // indirect github.com/go-jose/go-jose/v3 v3.0.3 // indirect github.com/go-jose/go-jose/v4 v4.0.2 // indirect - github.com/go-viper/mapstructure/v2 v2.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/goccy/go-json v0.10.3 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/mock v1.6.0 // indirect diff --git a/go.sum b/go.sum index ad0f03a00..ab27baf25 100644 --- a/go.sum +++ b/go.sum @@ -1334,8 +1334,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZ github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -1916,6 +1916,8 @@ github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/open-telemetry/opamp-go v0.17.0 h1:3R4+B/6Sy8mknLBbzO3gqloqwTT02rCSRcr4ac2B124= github.com/open-telemetry/opamp-go v0.17.0/go.mod h1:SGDhUoAx7uGutO4ENNMQla/tiSujxgZmMPJXIOPGBdk= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/aesprovider v0.112.0 h1:iSz2KCCb+rV0BdNUPxqp0hBWL2gOrwHPgFahh3Zy7dA= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/aesprovider v0.112.0/go.mod h1:nXpP0qMcRZDhqvuDKfB1wmOySD1T+rl6/kyz2EKQ5fo= github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.111.0 h1:YRtg8O1y//TsNeVaQcorIL6ha0NnTKdma9Tux8pfklg= github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.111.0/go.mod h1:izISYDkhEvgYXi/8gQAJvXxkFThk5AvN5M5FdCmxtyA= github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.111.0 h1:GZgIPUBQisxljpN9hLHD4X8eNUBOXZFP+4s3Hwn5YY4= @@ -2642,8 +2644,8 @@ go.opentelemetry.io/collector/config/configtls v1.17.0 h1:5DPgmBgpKEopLGmkjaihZH go.opentelemetry.io/collector/config/configtls v1.17.0/go.mod h1:xUV5/xAHJbwrCuT2rGurBGSUqyFFAVVBcQ5DJAENeCc= go.opentelemetry.io/collector/config/internal v0.111.0 h1:HTrN9xCpX42xlyDskWbhA/2NkSjMasxNEuGkmjjq7Q8= go.opentelemetry.io/collector/config/internal v0.111.0/go.mod h1:yC7E4h1Uj0SubxcFImh6OvBHFTjMh99+A5PuyIgDWqc= -go.opentelemetry.io/collector/confmap v1.17.0 h1:5UKHtPGtzNGaOGBsJ6aFpvsKElNUXOVuErBfC0eTWLM= -go.opentelemetry.io/collector/confmap v1.17.0/go.mod h1:GrIZ12P/9DPOuTpe2PIS51a0P/ZM6iKtByVee1Uf3+k= +go.opentelemetry.io/collector/confmap v1.18.0 h1:UEOeJY8RW8lZ1O4lzHSGqolS7uzkpXQi5fa8SidKqQg= +go.opentelemetry.io/collector/confmap v1.18.0/go.mod h1:GgNu1ElPGmLn9govqIfjaopvdspw4PJ9KeDtWC4E2Q4= go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0 h1:KH0ABOBfSPp5XZtHkoXeI9wKoOD9B0eN6TDo08SwN/c= go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0/go.mod h1:jyFbV9hLrYJf2zNjqcpzkzB6zmPj/Ohr+S+vmPuxyMY= go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0 h1:UyMO2ddtO7GKuFjrkR51IxmeBuRJrb1KKatu60oosxI=