Skip to content

Commit

Permalink
[chore] Rename internal/featuregates to internal/globalgates (#10614)
Browse files Browse the repository at this point in the history
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Fixes #10569. However, I think it's fine to just close the issue as
wontfix and not do this.
  • Loading branch information
mx-psi authored Jul 15, 2024
1 parent 183926d commit 75aeab0
Show file tree
Hide file tree
Showing 61 changed files with 123 additions and 123 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion cmd/builder/internal/builder/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var (
"/extension/auth",
"/extension/zpagesextension",
"/featuregate",
"/internal/featuregates",
"/internal/globalgates",
"/processor",
"/processor/batchprocessor",
"/processor/memorylimiterprocessor",
Expand Down
2 changes: 1 addition & 1 deletion cmd/builder/test/core.builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion cmd/otelcorecol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions config/configauth/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions config/configgrpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions config/confighttp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion config/internal/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions confmap/confmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions confmap/converter/expandconverter/expand.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 ""
}
Expand Down
10 changes: 5 additions & 5 deletions confmap/converter/expandconverter/expand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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))
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions confmap/converter/expandconverter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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
4 changes: 2 additions & 2 deletions confmap/expand.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions confmap/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions confmap/internal/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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
14 changes: 7 additions & 7 deletions confmap/internal/e2e/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}()

Expand Down Expand Up @@ -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)
}()

Expand Down
4 changes: 2 additions & 2 deletions confmap/provider/envprovider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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
4 changes: 2 additions & 2 deletions confmap/provider/fileprovider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions confmap/provider/httpprovider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions confmap/provider/httpsprovider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions confmap/provider/yamlprovider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions confmap/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 75aeab0

Please sign in to comment.