From 75aeab0f1dfddec2e97a34892ff9cda06ed2877c Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Mon, 15 Jul 2024 16:11:37 +0200 Subject: [PATCH] [chore] Rename internal/featuregates to internal/globalgates (#10614) #### Description Fixes #10569. However, I think it's fine to just close the issue as wontfix and not do this. --- Makefile | 4 ++-- cmd/builder/internal/builder/main_test.go | 2 +- cmd/builder/test/core.builder.yaml | 2 +- cmd/mdatagen/go.mod | 4 ++-- cmd/otelcorecol/builder-config.yaml | 2 +- cmd/otelcorecol/go.mod | 4 ++-- config/configauth/go.mod | 4 ++-- config/configgrpc/go.mod | 4 ++-- config/confighttp/go.mod | 4 ++-- config/internal/go.mod | 2 +- confmap/confmap.go | 4 ++-- confmap/converter/expandconverter/expand.go | 4 ++-- confmap/converter/expandconverter/expand_test.go | 10 +++++----- confmap/converter/expandconverter/go.mod | 4 ++-- confmap/expand.go | 4 ++-- confmap/go.mod | 4 ++-- confmap/internal/e2e/go.mod | 4 ++-- confmap/internal/e2e/types_test.go | 14 +++++++------- confmap/provider/envprovider/go.mod | 4 ++-- confmap/provider/fileprovider/go.mod | 4 ++-- confmap/provider/httpprovider/go.mod | 4 ++-- confmap/provider/httpsprovider/go.mod | 4 ++-- confmap/provider/yamlprovider/go.mod | 4 ++-- confmap/resolver.go | 4 ++-- connector/forwardconnector/go.mod | 4 ++-- connector/go.mod | 2 +- exporter/debugexporter/go.mod | 4 ++-- exporter/go.mod | 4 ++-- exporter/loggingexporter/go.mod | 4 ++-- exporter/nopexporter/go.mod | 4 ++-- exporter/otlpexporter/go.mod | 4 ++-- exporter/otlphttpexporter/go.mod | 4 ++-- extension/auth/go.mod | 4 ++-- extension/ballastextension/go.mod | 4 ++-- extension/go.mod | 4 ++-- extension/memorylimiterextension/go.mod | 4 ++-- extension/zpagesextension/go.mod | 4 ++-- filter/go.mod | 4 ++-- go.mod | 4 ++-- internal/e2e/go.mod | 4 ++-- internal/{featuregates => globalgates}/Makefile | 0 .../featuregates.go => globalgates/globalgates.go} | 2 +- internal/{featuregates => globalgates}/go.mod | 2 +- internal/{featuregates => globalgates}/go.sum | 0 otelcol/command.go | 4 ++-- otelcol/command_test.go | 6 +++--- otelcol/configprovider.go | 6 +++--- otelcol/configprovider_test.go | 10 +++++----- otelcol/go.mod | 4 ++-- otelcol/otelcoltest/go.mod | 4 ++-- processor/batchprocessor/go.mod | 4 ++-- processor/go.mod | 2 +- processor/memorylimiterprocessor/go.mod | 4 ++-- receiver/go.mod | 2 +- receiver/nopreceiver/go.mod | 4 ++-- receiver/otlpreceiver/go.mod | 4 ++-- service/go.mod | 4 ++-- service/internal/proctelemetry/config.go | 6 +++--- service/service.go | 4 ++-- service/telemetry_test.go | 6 +++--- versions.yaml | 2 +- 61 files changed, 123 insertions(+), 123 deletions(-) rename internal/{featuregates => globalgates}/Makefile (100%) rename internal/{featuregates/featuregates.go => globalgates/globalgates.go} (94%) rename internal/{featuregates => globalgates}/go.mod (80%) rename internal/{featuregates => globalgates}/go.sum (100%) diff --git a/Makefile b/Makefile index 34c0207d10e..46b5cffb5dc 100644 --- a/Makefile +++ b/Makefile @@ -290,7 +290,7 @@ check-contrib: -replace go.opentelemetry.io/collector/extension/memorylimiterextension=$(CURDIR)/extension/memorylimiterextension \ -replace go.opentelemetry.io/collector/extension/zpagesextension=$(CURDIR)/extension/zpagesextension \ -replace go.opentelemetry.io/collector/featuregate=$(CURDIR)/featuregate \ - -replace go.opentelemetry.io/collector/internal/featuregates=$(CURDIR)/internal/featuregates \ + -replace go.opentelemetry.io/collector/internal/globalgates=$(CURDIR)/internal/globalgates \ -replace go.opentelemetry.io/collector/otelcol=$(CURDIR)/otelcol \ -replace go.opentelemetry.io/collector/otelcol/otelcoltest=$(CURDIR)/otelcol/otelcoltest \ -replace go.opentelemetry.io/collector/pdata=$(CURDIR)/pdata \ @@ -349,7 +349,7 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector/extension/memorylimiterextension \ -dropreplace go.opentelemetry.io/collector/extension/zpagesextension \ -dropreplace go.opentelemetry.io/collector/featuregate \ - -dropreplace go.opentelemetry.io/collector/internal/featuregates \ + -dropreplace go.opentelemetry.io/collector/internal/globalgates \ -dropreplace go.opentelemetry.io/collector/otelcol \ -dropreplace go.opentelemetry.io/collector/otelcol/otelcoltest \ -dropreplace go.opentelemetry.io/collector/pdata \ diff --git a/cmd/builder/internal/builder/main_test.go b/cmd/builder/internal/builder/main_test.go index 3d8d36729c6..d2c06279eb1 100644 --- a/cmd/builder/internal/builder/main_test.go +++ b/cmd/builder/internal/builder/main_test.go @@ -69,7 +69,7 @@ var ( "/extension/auth", "/extension/zpagesextension", "/featuregate", - "/internal/featuregates", + "/internal/globalgates", "/processor", "/processor/batchprocessor", "/processor/memorylimiterprocessor", diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 39c7645efec..92da9d2dee7 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -46,7 +46,7 @@ replaces: - go.opentelemetry.io/collector/extension/auth => ${WORKSPACE_DIR}/extension/auth - go.opentelemetry.io/collector/extension/zpagesextension => ${WORKSPACE_DIR}/extension/zpagesextension - go.opentelemetry.io/collector/featuregate => ${WORKSPACE_DIR}/featuregate - - go.opentelemetry.io/collector/internal/featuregates => ${WORKSPACE_DIR}/internal/featuregates + - go.opentelemetry.io/collector/internal/globalgates => ${WORKSPACE_DIR}/internal/globalgates - go.opentelemetry.io/collector/otelcol => ${WORKSPACE_DIR}/otelcol - go.opentelemetry.io/collector/otelcol/otelcoltest => ${WORKSPACE_DIR}/otelcol/otelcoltest - go.opentelemetry.io/collector/pdata => ${WORKSPACE_DIR}/pdata diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index d25611c120d..1d66cd9e9d5 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -48,7 +48,7 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect go.uber.org/multierr v1.11.0 // indirect @@ -92,4 +92,4 @@ retract ( replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index 01253a71db4..a0f7423e78a 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -41,7 +41,7 @@ providers: replaces: - go.opentelemetry.io/collector => ../../ - - go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates + - go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates - go.opentelemetry.io/collector/otelcol => ../../otelcol - go.opentelemetry.io/collector/component => ../../component - go.opentelemetry.io/collector/config/configauth => ../../config/configauth diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index 8593d01a505..dff6eeb4718 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -94,7 +94,7 @@ require ( go.opentelemetry.io/collector/consumer v0.104.0 // indirect go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/collector/semconv v0.104.0 // indirect go.opentelemetry.io/collector/service v0.104.0 // indirect @@ -136,7 +136,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/otelcol => ../../otelcol diff --git a/config/configauth/go.mod b/config/configauth/go.mod index c76520ce297..57147f242ee 100644 --- a/config/configauth/go.mod +++ b/config/configauth/go.mod @@ -24,7 +24,7 @@ require ( go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/confmap v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -54,4 +54,4 @@ replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth replace go.opentelemetry.io/collector/featuregate => ../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/config/configgrpc/go.mod b/config/configgrpc/go.mod index 7859432fede..df66a60de78 100644 --- a/config/configgrpc/go.mod +++ b/config/configgrpc/go.mod @@ -54,7 +54,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/confmap v0.104.0 // indirect go.opentelemetry.io/collector/extension v0.104.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -72,7 +72,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/config/configauth => ../configauth diff --git a/config/confighttp/go.mod b/config/confighttp/go.mod index 16fca9ec7dc..6c09442d655 100644 --- a/config/confighttp/go.mod +++ b/config/confighttp/go.mod @@ -49,7 +49,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/confmap v0.104.0 // indirect go.opentelemetry.io/collector/extension v0.104.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -67,7 +67,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/config/configauth => ../configauth diff --git a/config/internal/go.mod b/config/internal/go.mod index 7c7af60e026..2bb2c1bdd27 100644 --- a/config/internal/go.mod +++ b/config/internal/go.mod @@ -36,4 +36,4 @@ replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/confmap/confmap.go b/confmap/confmap.go index c7c89df28bb..f22d3f3f242 100644 --- a/confmap/confmap.go +++ b/confmap/confmap.go @@ -17,7 +17,7 @@ import ( "github.com/knadh/koanf/v2" encoder "go.opentelemetry.io/collector/confmap/internal/mapstructure" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) const ( @@ -157,7 +157,7 @@ func decodeConfig(m *Conf, result any, errorUnused bool, skipTopLevelUnmarshaler ErrorUnused: errorUnused, Result: result, TagName: "mapstructure", - WeaklyTypedInput: !featuregates.StrictlyTypedInputGate.IsEnabled(), + WeaklyTypedInput: !globalgates.StrictlyTypedInputGate.IsEnabled(), MatchName: caseSensitiveMatchName, DecodeHook: mapstructure.ComposeDecodeHookFunc( expandNilStructPointersHookFunc(), diff --git a/confmap/converter/expandconverter/expand.go b/confmap/converter/expandconverter/expand.go index aa18d1a3817..e603ca9ce04 100644 --- a/confmap/converter/expandconverter/expand.go +++ b/confmap/converter/expandconverter/expand.go @@ -13,7 +13,7 @@ import ( "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/internal/envvar" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) type converter struct { @@ -93,7 +93,7 @@ func (c converter) expandEnv(s string) (string, error) { // in order to make sure we don't log a warning for ${VAR} var regex = regexp.MustCompile(fmt.Sprintf(`\$%s`, regexp.QuoteMeta(str))) if _, exists := c.loggedDeprecations[str]; !exists && regex.MatchString(s) { - if featuregates.UseUnifiedEnvVarExpansionRules.IsEnabled() { + if globalgates.UseUnifiedEnvVarExpansionRules.IsEnabled() { err = fmt.Errorf("variable substitution using $VAR has been deprecated in favor of ${VAR} and ${env:VAR} - please update $%s or temporarily disable the confmap.unifyEnvVarExpansion feature gate", str) return "" } diff --git a/confmap/converter/expandconverter/expand_test.go b/confmap/converter/expandconverter/expand_test.go index ab2fa49c549..4c7ff254e15 100644 --- a/confmap/converter/expandconverter/expand_test.go +++ b/confmap/converter/expandconverter/expand_test.go @@ -19,7 +19,7 @@ import ( "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/confmap/internal/envvar" "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) func TestNewExpandConverter(t *testing.T) { @@ -48,9 +48,9 @@ func TestNewExpandConverter(t *testing.T) { for _, test := range testCases { t.Run(test.name, func(t *testing.T) { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.UseUnifiedEnvVarExpansionRules.ID(), false)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.UseUnifiedEnvVarExpansionRules.ID(), false)) t.Cleanup(func() { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.UseUnifiedEnvVarExpansionRules.ID(), true)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.UseUnifiedEnvVarExpansionRules.ID(), true)) }) conf, err := confmaptest.LoadConf(filepath.Join("testdata", test.name)) @@ -64,9 +64,9 @@ func TestNewExpandConverter(t *testing.T) { } func TestNewExpandConverter_UseUnifiedEnvVarExpansionRules(t *testing.T) { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.UseUnifiedEnvVarExpansionRules.ID(), true)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.UseUnifiedEnvVarExpansionRules.ID(), true)) t.Cleanup(func() { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.UseUnifiedEnvVarExpansionRules.ID(), false)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.UseUnifiedEnvVarExpansionRules.ID(), false)) }) const valueExtra = "some string" diff --git a/confmap/converter/expandconverter/go.mod b/confmap/converter/expandconverter/go.mod index 793423f0e32..facf75fa2be 100644 --- a/confmap/converter/expandconverter/go.mod +++ b/confmap/converter/expandconverter/go.mod @@ -6,7 +6,7 @@ require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/confmap v0.104.0 go.opentelemetry.io/collector/featuregate v1.11.0 - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -29,4 +29,4 @@ replace go.opentelemetry.io/collector/confmap => ../.. replace go.opentelemetry.io/collector/featuregate => ../../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../../internal/globalgates diff --git a/confmap/expand.go b/confmap/expand.go index 16ef9dbe22f..d006686bc2a 100644 --- a/confmap/expand.go +++ b/confmap/expand.go @@ -12,7 +12,7 @@ import ( "strconv" "strings" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) // schemePattern defines the regexp pattern for scheme names. @@ -146,7 +146,7 @@ func (mr *Resolver) findAndExpandURI(ctx context.Context, input string) (any, bo } var repl string - if featuregates.StrictlyTypedInputGate.IsEnabled() { + if globalgates.StrictlyTypedInputGate.IsEnabled() { repl, err = expanded.AsString() } else { repl, err = toString(expanded) diff --git a/confmap/go.mod b/confmap/go.mod index b4330c9bac7..6e405a56863 100644 --- a/confmap/go.mod +++ b/confmap/go.mod @@ -8,7 +8,7 @@ require ( github.com/knadh/koanf/providers/confmap v0.1.0 github.com/knadh/koanf/v2 v2.1.1 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -31,4 +31,4 @@ retract ( replace go.opentelemetry.io/collector/featuregate => ../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates diff --git a/confmap/internal/e2e/go.mod b/confmap/internal/e2e/go.mod index a24fa5ec0c4..0bae4851499 100644 --- a/confmap/internal/e2e/go.mod +++ b/confmap/internal/e2e/go.mod @@ -8,7 +8,7 @@ require ( go.opentelemetry.io/collector/confmap/provider/envprovider v0.104.0 go.opentelemetry.io/collector/confmap/provider/fileprovider v0.104.0 go.opentelemetry.io/collector/featuregate v1.11.0 - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 ) require ( @@ -34,4 +34,4 @@ replace go.opentelemetry.io/collector/confmap/provider/envprovider => ../../prov replace go.opentelemetry.io/collector/featuregate => ../../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../../internal/globalgates diff --git a/confmap/internal/e2e/types_test.go b/confmap/internal/e2e/types_test.go index 7385ce1cde3..bf7f516138d 100644 --- a/confmap/internal/e2e/types_test.go +++ b/confmap/internal/e2e/types_test.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/collector/confmap/provider/envprovider" "go.opentelemetry.io/collector/confmap/provider/fileprovider" "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) type TargetField string @@ -172,11 +172,11 @@ func TestTypeCasting(t *testing.T) { }, } - previousValue := featuregates.StrictlyTypedInputGate.IsEnabled() - err := featuregate.GlobalRegistry().Set(featuregates.StrictlyTypedInputID, false) + previousValue := globalgates.StrictlyTypedInputGate.IsEnabled() + err := featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, false) require.NoError(t, err) defer func() { - err := featuregate.GlobalRegistry().Set(featuregates.StrictlyTypedInputID, previousValue) + err := featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, previousValue) require.NoError(t, err) }() @@ -317,11 +317,11 @@ func TestStrictTypeCasting(t *testing.T) { }, } - previousValue := featuregates.StrictlyTypedInputGate.IsEnabled() - err := featuregate.GlobalRegistry().Set(featuregates.StrictlyTypedInputID, true) + previousValue := globalgates.StrictlyTypedInputGate.IsEnabled() + err := featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, true) require.NoError(t, err) defer func() { - err := featuregate.GlobalRegistry().Set(featuregates.StrictlyTypedInputID, previousValue) + err := featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, previousValue) require.NoError(t, err) }() diff --git a/confmap/provider/envprovider/go.mod b/confmap/provider/envprovider/go.mod index 3d417b9f801..b34f246937d 100644 --- a/confmap/provider/envprovider/go.mod +++ b/confmap/provider/envprovider/go.mod @@ -20,7 +20,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.uber.org/multierr v1.11.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -29,4 +29,4 @@ replace go.opentelemetry.io/collector/confmap => ../../ replace go.opentelemetry.io/collector/featuregate => ../../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../../internal/globalgates diff --git a/confmap/provider/fileprovider/go.mod b/confmap/provider/fileprovider/go.mod index 251ab0201f4..579865aefa6 100644 --- a/confmap/provider/fileprovider/go.mod +++ b/confmap/provider/fileprovider/go.mod @@ -19,7 +19,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -29,4 +29,4 @@ replace go.opentelemetry.io/collector/confmap => ../../ replace go.opentelemetry.io/collector/featuregate => ../../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../../internal/globalgates diff --git a/confmap/provider/httpprovider/go.mod b/confmap/provider/httpprovider/go.mod index 129f7aa5823..f01a4ec22bf 100644 --- a/confmap/provider/httpprovider/go.mod +++ b/confmap/provider/httpprovider/go.mod @@ -19,7 +19,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -29,4 +29,4 @@ replace go.opentelemetry.io/collector/confmap => ../../ replace go.opentelemetry.io/collector/featuregate => ../../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../../internal/globalgates diff --git a/confmap/provider/httpsprovider/go.mod b/confmap/provider/httpsprovider/go.mod index ada9f4265e7..fcf1b024c23 100644 --- a/confmap/provider/httpsprovider/go.mod +++ b/confmap/provider/httpsprovider/go.mod @@ -19,7 +19,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -29,4 +29,4 @@ replace go.opentelemetry.io/collector/confmap => ../../ replace go.opentelemetry.io/collector/featuregate => ../../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../../internal/globalgates diff --git a/confmap/provider/yamlprovider/go.mod b/confmap/provider/yamlprovider/go.mod index 4f21c81c8a5..315ab6235ad 100644 --- a/confmap/provider/yamlprovider/go.mod +++ b/confmap/provider/yamlprovider/go.mod @@ -19,7 +19,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -29,4 +29,4 @@ replace go.opentelemetry.io/collector/confmap => ../../ replace go.opentelemetry.io/collector/featuregate => ../../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../../internal/globalgates diff --git a/confmap/resolver.go b/confmap/resolver.go index 148049a5ad3..ca197076327 100644 --- a/confmap/resolver.go +++ b/confmap/resolver.go @@ -13,7 +13,7 @@ import ( "go.uber.org/multierr" "go.uber.org/zap" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) // follows drive-letter specification: @@ -174,7 +174,7 @@ func (mr *Resolver) Resolve(ctx context.Context) (*Conf, error) { return nil, err } - if v, ok := val.(string); ok && featuregates.UseUnifiedEnvVarExpansionRules.IsEnabled() { + if v, ok := val.(string); ok && globalgates.UseUnifiedEnvVarExpansionRules.IsEnabled() { cfgMap[k] = strings.ReplaceAll(v, "$$", "$") } else { cfgMap[k] = val diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index 83a8f5916d6..243eb0ff3d5 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -39,7 +39,7 @@ require ( go.opentelemetry.io/collector v0.104.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -59,7 +59,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/component => ../../component diff --git a/connector/go.mod b/connector/go.mod index a3ea7d52721..1dd90626666 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -66,4 +66,4 @@ replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates diff --git a/exporter/debugexporter/go.mod b/exporter/debugexporter/go.mod index f9f2210a0f7..704f4fab6a7 100644 --- a/exporter/debugexporter/go.mod +++ b/exporter/debugexporter/go.mod @@ -44,7 +44,7 @@ require ( go.opentelemetry.io/collector/config/configretry v1.11.0 // indirect go.opentelemetry.io/collector/extension v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/collector/receiver v0.104.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect @@ -65,7 +65,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/component => ../../component diff --git a/exporter/go.mod b/exporter/go.mod index 372739bfa50..0b1b3ef4a44 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -52,7 +52,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/confmap v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect golang.org/x/net v0.26.0 // indirect @@ -64,7 +64,7 @@ require ( replace go.opentelemetry.io/collector => ../ -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates replace go.opentelemetry.io/collector/component => ../component diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index 52b5f8adbaa..beba78fc867 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -44,7 +44,7 @@ require ( go.opentelemetry.io/collector/consumer v0.104.0 // indirect go.opentelemetry.io/collector/extension v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/receiver v0.104.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -64,7 +64,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/component => ../../component diff --git a/exporter/nopexporter/go.mod b/exporter/nopexporter/go.mod index 1dfb5a09d1b..de62a2b8e63 100644 --- a/exporter/nopexporter/go.mod +++ b/exporter/nopexporter/go.mod @@ -38,7 +38,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/receiver v0.104.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -73,7 +73,7 @@ replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector => ../.. -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/featuregate => ../../featuregate diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index e151f9d9c8b..6e25b373c65 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -60,7 +60,7 @@ require ( go.opentelemetry.io/collector/extension v0.104.0 // indirect go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/collector/receiver v0.104.0 // indirect go.opentelemetry.io/contrib/config v0.8.0 // indirect @@ -137,4 +137,4 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 5d9b30ecfba..2be84e25b08 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -59,7 +59,7 @@ require ( go.opentelemetry.io/collector/extension v0.104.0 // indirect go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/receiver v0.104.0 // indirect go.opentelemetry.io/contrib/config v0.8.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect @@ -133,4 +133,4 @@ retract ( replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/extension/auth/go.mod b/extension/auth/go.mod index a461ca34b15..c5526624e99 100644 --- a/extension/auth/go.mod +++ b/extension/auth/go.mod @@ -34,7 +34,7 @@ require ( go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/confmap v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -64,4 +64,4 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con replace go.opentelemetry.io/collector/featuregate => ../../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index b7ce0f4774d..e4dc2df486b 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -43,7 +43,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -63,7 +63,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/component => ../../component diff --git a/extension/go.mod b/extension/go.mod index 17980516316..bca3e9f63d6 100644 --- a/extension/go.mod +++ b/extension/go.mod @@ -32,7 +32,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -61,4 +61,4 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../config/config replace go.opentelemetry.io/collector/featuregate => ../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates diff --git a/extension/memorylimiterextension/go.mod b/extension/memorylimiterextension/go.mod index 2cc7c61799d..b560a73003b 100644 --- a/extension/memorylimiterextension/go.mod +++ b/extension/memorylimiterextension/go.mod @@ -42,7 +42,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -62,7 +62,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/component => ../../component diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 4e5279b4f19..9b6a900d28a 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -52,7 +52,7 @@ require ( go.opentelemetry.io/collector/config/internal v0.104.0 // indirect go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/contrib/config v0.8.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect @@ -121,4 +121,4 @@ replace go.opentelemetry.io/collector/config/confighttp => ../../config/confight replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/filter/go.mod b/filter/go.mod index 6bff8067058..490034653de 100644 --- a/filter/go.mod +++ b/filter/go.mod @@ -18,7 +18,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -28,4 +28,4 @@ replace go.opentelemetry.io/collector/confmap => ../confmap replace go.opentelemetry.io/collector/featuregate => ../featuregate -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates diff --git a/go.mod b/go.mod index 9a6657fa6b5..1a5a1aa406e 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 // indirect @@ -111,4 +111,4 @@ retract ( replace go.opentelemetry.io/collector/pdata/pprofile => ./pdata/pprofile -replace go.opentelemetry.io/collector/internal/featuregates => ./internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ./internal/globalgates diff --git a/internal/e2e/go.mod b/internal/e2e/go.mod index 9dc8e3ed0ae..257f878086f 100644 --- a/internal/e2e/go.mod +++ b/internal/e2e/go.mod @@ -63,7 +63,7 @@ require ( go.opentelemetry.io/collector/extension v0.104.0 // indirect go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/contrib/config v0.8.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect @@ -147,4 +147,4 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry -replace go.opentelemetry.io/collector/internal/featuregates => ../featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../globalgates diff --git a/internal/featuregates/Makefile b/internal/globalgates/Makefile similarity index 100% rename from internal/featuregates/Makefile rename to internal/globalgates/Makefile diff --git a/internal/featuregates/featuregates.go b/internal/globalgates/globalgates.go similarity index 94% rename from internal/featuregates/featuregates.go rename to internal/globalgates/globalgates.go index 12aa6f851f9..66f4b44bc9a 100644 --- a/internal/featuregates/featuregates.go +++ b/internal/globalgates/globalgates.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package featuregates // import "go.opentelemetry.io/collector/internal/featuregates" +package globalgates // import "go.opentelemetry.io/collector/internal/globalgates" import "go.opentelemetry.io/collector/featuregate" diff --git a/internal/featuregates/go.mod b/internal/globalgates/go.mod similarity index 80% rename from internal/featuregates/go.mod rename to internal/globalgates/go.mod index ec1b35fdd05..c6b744f0327 100644 --- a/internal/featuregates/go.mod +++ b/internal/globalgates/go.mod @@ -1,4 +1,4 @@ -module go.opentelemetry.io/collector/internal/featuregates +module go.opentelemetry.io/collector/internal/globalgates go 1.21.0 diff --git a/internal/featuregates/go.sum b/internal/globalgates/go.sum similarity index 100% rename from internal/featuregates/go.sum rename to internal/globalgates/go.sum diff --git a/otelcol/command.go b/otelcol/command.go index 8516ec831ff..b75c0b29fa8 100644 --- a/otelcol/command.go +++ b/otelcol/command.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) // NewCommand constructs a new cobra.Command using the given CollectorSettings. @@ -66,7 +66,7 @@ func updateSettingsUsingFlags(set *CollectorSettings, flags *flag.FlagSet) error return errors.New("at least one config flag must be provided") } - if featuregates.UseUnifiedEnvVarExpansionRules.IsEnabled() && set.ConfigProviderSettings.ResolverSettings.DefaultScheme == "" { + if globalgates.UseUnifiedEnvVarExpansionRules.IsEnabled() && set.ConfigProviderSettings.ResolverSettings.DefaultScheme == "" { set.ConfigProviderSettings.ResolverSettings.DefaultScheme = "env" } diff --git a/otelcol/command_test.go b/otelcol/command_test.go index 4b4860103c4..42b2212b06e 100644 --- a/otelcol/command_test.go +++ b/otelcol/command_test.go @@ -15,7 +15,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) func TestNewCommandVersion(t *testing.T) { @@ -139,9 +139,9 @@ func Test_UseUnifiedEnvVarExpansionRules(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.UseUnifiedEnvVarExpansionRules.ID(), true)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.UseUnifiedEnvVarExpansionRules.ID(), true)) t.Cleanup(func() { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.UseUnifiedEnvVarExpansionRules.ID(), false)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.UseUnifiedEnvVarExpansionRules.ID(), false)) }) fileProvider := newFakeProvider("file", func(_ context.Context, _ string, _ confmap.WatcherFunc) (*confmap.Retrieved, error) { return &confmap.Retrieved{}, nil diff --git a/otelcol/configprovider.go b/otelcol/configprovider.go index 344d86fb86a..e5c56aa8671 100644 --- a/otelcol/configprovider.go +++ b/otelcol/configprovider.go @@ -9,12 +9,12 @@ import ( "strings" "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) var ( strictlyTypedMessageCoda = `Hint: Temporarily restore the previous behavior by disabling - the ` + fmt.Sprintf("`%s`", featuregates.StrictlyTypedInputID) + ` feature gate. More details at: + the ` + fmt.Sprintf("`%s`", globalgates.StrictlyTypedInputID) + ` feature gate. More details at: https://github.com/open-telemetry/opentelemetry-collector/issues/10552` ) @@ -107,7 +107,7 @@ func (cm *configProvider) Get(ctx context.Context, factories Factories) (*Config if cfg, err = unmarshal(conf, factories); err != nil { err = fmt.Errorf("cannot unmarshal the configuration: %w", err) - if featuregates.StrictlyTypedInputGate.IsEnabled() { + if globalgates.StrictlyTypedInputGate.IsEnabled() { var shouldAddCoda bool for _, errorStr := range []string{ "got unconvertible type", // https://github.com/mitchellh/mapstructure/blob/8508981/mapstructure.go#L610 diff --git a/otelcol/configprovider_test.go b/otelcol/configprovider_test.go index a11bc9b019d..da810a96daf 100644 --- a/otelcol/configprovider_test.go +++ b/otelcol/configprovider_test.go @@ -15,7 +15,7 @@ import ( "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" ) func newConfig(yamlBytes []byte, factories Factories) (*Config, error) { @@ -181,13 +181,13 @@ func TestStrictlyTypedCoda(t *testing.T) { require.NoError(t, err) // Save the previous value of the feature gate and restore it after the test. - prev := featuregates.StrictlyTypedInputGate.IsEnabled() + prev := globalgates.StrictlyTypedInputGate.IsEnabled() defer func() { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.StrictlyTypedInputID, prev)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, prev)) }() // Ensure the error does not appear with the feature gate disabled. - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.StrictlyTypedInputID, false)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, false)) _, errWeakTypes := cp.Get(context.Background(), factories) if tt.isErrFromStrictTypes { require.Error(t, errWeakTypes) @@ -198,7 +198,7 @@ func TestStrictlyTypedCoda(t *testing.T) { } // Test with the feature gate enabled. - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.StrictlyTypedInputID, true)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.StrictlyTypedInputID, true)) _, errStrictTypes := cp.Get(context.Background(), factories) require.Error(t, errStrictTypes) if tt.isErrFromStrictTypes { diff --git a/otelcol/go.mod b/otelcol/go.mod index 1eadf69a1ee..dc4f3fbd17f 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -12,7 +12,7 @@ require ( go.opentelemetry.io/collector/exporter v0.104.0 go.opentelemetry.io/collector/extension v0.104.0 go.opentelemetry.io/collector/featuregate v1.11.0 - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 go.opentelemetry.io/collector/processor v0.104.0 go.opentelemetry.io/collector/receiver v0.104.0 go.opentelemetry.io/collector/service v0.104.0 @@ -147,4 +147,4 @@ replace go.opentelemetry.io/collector/config/configtls => ../config/configtls replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates diff --git a/otelcol/otelcoltest/go.mod b/otelcol/otelcoltest/go.mod index 9eda55d4950..88344dcf542 100644 --- a/otelcol/otelcoltest/go.mod +++ b/otelcol/otelcoltest/go.mod @@ -64,7 +64,7 @@ require ( go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/consumer v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.104.0 // indirect @@ -165,4 +165,4 @@ replace go.opentelemetry.io/collector/semconv => ../../semconv replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index 992a5e13dfa..d0e75217d0d 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -45,7 +45,7 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect @@ -61,7 +61,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/processor => ../ diff --git a/processor/go.mod b/processor/go.mod index 7004061e549..9ce7a9b1f29 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -66,4 +66,4 @@ replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 3de18d33ae4..420526d1749 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -46,7 +46,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.104.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect @@ -68,7 +68,7 @@ require ( replace go.opentelemetry.io/collector => ../../ -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/processor => ../ diff --git a/receiver/go.mod b/receiver/go.mod index 4e272137d21..0a631f2379b 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -66,4 +66,4 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../config/config replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates diff --git a/receiver/nopreceiver/go.mod b/receiver/nopreceiver/go.mod index f8c132aec8a..1a0e1d70a15 100644 --- a/receiver/nopreceiver/go.mod +++ b/receiver/nopreceiver/go.mod @@ -37,7 +37,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata v1.11.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -72,7 +72,7 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con replace go.opentelemetry.io/collector => ../.. -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates replace go.opentelemetry.io/collector/featuregate => ../../featuregate diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index 9cf97c63c43..ee7a6e1341e 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -62,7 +62,7 @@ require ( go.opentelemetry.io/collector/extension v0.104.0 // indirect go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect go.opentelemetry.io/contrib/config v0.8.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect @@ -137,4 +137,4 @@ retract ( replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile -replace go.opentelemetry.io/collector/internal/featuregates => ../../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates diff --git a/service/go.mod b/service/go.mod index 879f7478a3e..16db8d10124 100644 --- a/service/go.mod +++ b/service/go.mod @@ -21,7 +21,7 @@ require ( go.opentelemetry.io/collector/extension v0.104.0 go.opentelemetry.io/collector/extension/zpagesextension v0.104.0 go.opentelemetry.io/collector/featuregate v1.11.0 - go.opentelemetry.io/collector/internal/featuregates v0.0.0-20240705161705-b127da089038 + go.opentelemetry.io/collector/internal/globalgates v0.0.0-20240705161705-b127da089038 go.opentelemetry.io/collector/pdata v1.11.0 go.opentelemetry.io/collector/pdata/testdata v0.104.0 go.opentelemetry.io/collector/processor v0.104.0 @@ -155,4 +155,4 @@ replace go.opentelemetry.io/collector/config/configcompression => ../config/conf replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile -replace go.opentelemetry.io/collector/internal/featuregates => ../internal/featuregates +replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates diff --git a/service/internal/proctelemetry/config.go b/service/internal/proctelemetry/config.go index 493515f01db..411513f713f 100644 --- a/service/internal/proctelemetry/config.go +++ b/service/internal/proctelemetry/config.go @@ -28,7 +28,7 @@ import ( sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" "go.opentelemetry.io/collector/processor/processorhelper" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" ) @@ -70,7 +70,7 @@ func InitMetricReader(ctx context.Context, reader config.MetricReader, asyncErro if reader.Periodic != nil { var opts []sdkmetric.PeriodicReaderOption - if !featuregates.DisableOpenCensusBridge.IsEnabled() { + if !globalgates.DisableOpenCensusBridge.IsEnabled() { opts = append(opts, sdkmetric.WithProducer(opencensus.NewMetricProducer())) } if reader.Periodic.Interval != nil { @@ -175,7 +175,7 @@ func initPrometheusExporter(prometheusConfig *config.Prometheus, asyncErrorChann otelprom.WithNamespace("otelcol"), otelprom.WithResourceAsConstantLabels(attribute.NewDenyKeysFilter()), } - if !featuregates.DisableOpenCensusBridge.IsEnabled() { + if !globalgates.DisableOpenCensusBridge.IsEnabled() { opts = append(opts, otelprom.WithProducer(opencensus.NewMetricProducer())) } exporter, err := otelprom.New(opts...) diff --git a/service/service.go b/service/service.go index f160335d83f..99747db9ac6 100644 --- a/service/service.go +++ b/service/service.go @@ -22,7 +22,7 @@ import ( "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/extension" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" "go.opentelemetry.io/collector/internal/localhostgate" "go.opentelemetry.io/collector/internal/obsreportconfig" "go.opentelemetry.io/collector/pdata/pcommon" @@ -115,7 +115,7 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { logger.Info("Setting up own telemetry...") - if featuregates.DisableOpenCensusBridge.IsEnabled() { + if globalgates.DisableOpenCensusBridge.IsEnabled() { logger.Info("OpenCensus bridge is disabled for Collector telemetry and will be removed in a future version, use --feature-gates=-service.disableOpenCensusBridge to re-enable") } mp, err := newMeterProvider( diff --git a/service/telemetry_test.go b/service/telemetry_test.go index cb89f244a59..eac6d333b7e 100644 --- a/service/telemetry_test.go +++ b/service/telemetry_test.go @@ -20,7 +20,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/featuregates" + "go.opentelemetry.io/collector/internal/globalgates" "go.opentelemetry.io/collector/internal/testutil" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" "go.opentelemetry.io/collector/service/internal/proctelemetry" @@ -262,9 +262,9 @@ func TestTelemetryInit(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.DisableOpenCensusBridge.ID(), tc.disableCensusBridge)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.DisableOpenCensusBridge.ID(), tc.disableCensusBridge)) t.Cleanup(func() { - require.NoError(t, featuregate.GlobalRegistry().Set(featuregates.DisableOpenCensusBridge.ID(), true)) + require.NoError(t, featuregate.GlobalRegistry().Set(globalgates.DisableOpenCensusBridge.ID(), true)) }) if tc.extendedConfig { tc.cfg.Metrics.Readers = []config.MetricReader{ diff --git a/versions.yaml b/versions.yaml index 90ecb1250fd..483bbaf9189 100644 --- a/versions.yaml +++ b/versions.yaml @@ -15,7 +15,7 @@ module-sets: version: v0.104.0 modules: - go.opentelemetry.io/collector - - go.opentelemetry.io/collector/internal/featuregates + - go.opentelemetry.io/collector/internal/globalgates - go.opentelemetry.io/collector/cmd/builder - go.opentelemetry.io/collector/cmd/mdatagen - go.opentelemetry.io/collector/component