From 371608670cd9d401cd470b3f6d127661cfe58cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 22 Jun 2023 15:22:03 +0200 Subject: [PATCH] chore: don't disable pkg.translator.prometheus.NormalizeName by default This is now disabled by default in upstream as well. --- otelcolbuilder/cmd/configprovider.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/otelcolbuilder/cmd/configprovider.go b/otelcolbuilder/cmd/configprovider.go index 47c31d9f05..a9f6b1460a 100644 --- a/otelcolbuilder/cmd/configprovider.go +++ b/otelcolbuilder/cmd/configprovider.go @@ -36,19 +36,12 @@ import ( // https://github.com/open-telemetry/opentelemetry-collector/blob/65dfc325d974be8ebb7c170b90c6646f9eaef27b/service/command.go#L38 func UseCustomConfigProvider(params *otelcol.CollectorSettings) error { - var err error // feature flags, which are enabled by default in our distro - err = featuregate.GlobalRegistry().Set("extension.sumologic.updateCollectorMetadata", true) - if err != nil { - return fmt.Errorf("setting feature gate flags failed: %s", err) - } + err := featuregate.GlobalRegistry().Set("extension.sumologic.updateCollectorMetadata", true) - // see: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/21743 - err = featuregate.GlobalRegistry().Set("pkg.translator.prometheus.NormalizeName", false) if err != nil { return fmt.Errorf("setting feature gate flags failed: %s", err) } - // to create the provider, we need config locations passed in via the command line // to get these, we take the command the service uses to start, parse the flags, and read the values flagset := flags(featuregate.GlobalRegistry())