From 0adc73194a4c9ad1aa618fda76b67b059a8c3e78 Mon Sep 17 00:00:00 2001 From: Ryan Fitzpatrick Date: Fri, 24 Jun 2022 16:25:01 -0400 Subject: [PATCH] Only use config server if env var unset (#1728) --- README.md | 5 +++++ cmd/otelcol/main.go | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2924f0d9efd..f6b67090be7 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,11 @@ In addition, the following components can be configured: - Information about migrating from the SignalFx Smart Agent can be found [here](docs/signalfx-smart-agent-migration.md) +By default the Splunk OpenTelemetry Collector provides a sensitive value-redacting, local config server listening at +`http://localhost:55554/debug/configz/effective` that is helpful in troubleshooting. To disable this feature please +set the `SPLUNK_DEBUG_CONFIG_SERVER` environment variable to any value other than `true`. To set the desired port to +listen to configure the `SPLUNK_DEBUG_CONFIG_SERVER_PORT` environment variable. + ## Upgrade guidelines The following changes need to be done to configuration files for Splunk OTel Collector for specific diff --git a/cmd/otelcol/main.go b/cmd/otelcol/main.go index a2fbd5ebe6c..d4020f9bc87 100644 --- a/cmd/otelcol/main.go +++ b/cmd/otelcol/main.go @@ -75,7 +75,9 @@ func main() { // Allow dumping configuration locally by default // Used by support bundle script - _ = os.Setenv(configServerEnabledEnvVar, "true") + if _, ok := os.LookupEnv(configServerEnabledEnvVar); !ok { + _ = os.Setenv(configServerEnabledEnvVar, "true") + } factories, err := components.Get() if err != nil {