From 8ef36d286baf3e6bd3b6e38ca1020f3cc418b2b4 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Wed, 2 Aug 2023 18:32:33 -0700 Subject: [PATCH] code review --- cmd/otelcol/config/collector/agent_config.yaml | 3 +++ cmd/otelcol/config/collector/gateway_config.yaml | 3 +++ tests/general/default_config_test.go | 10 ++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/cmd/otelcol/config/collector/agent_config.yaml b/cmd/otelcol/config/collector/agent_config.yaml index ce88d31ce6..9bbca82f81 100644 --- a/cmd/otelcol/config/collector/agent_config.yaml +++ b/cmd/otelcol/config/collector/agent_config.yaml @@ -161,6 +161,9 @@ exporters: verbosity: detailed service: + telemetry: + metrics: + address: "${SPLUNK_LISTEN_INTERFACE}:8888" extensions: [health_check, http_forwarder, zpages, memory_ballast, smartagent] pipelines: traces: diff --git a/cmd/otelcol/config/collector/gateway_config.yaml b/cmd/otelcol/config/collector/gateway_config.yaml index c09373983f..f21f70bb0b 100644 --- a/cmd/otelcol/config/collector/gateway_config.yaml +++ b/cmd/otelcol/config/collector/gateway_config.yaml @@ -121,6 +121,9 @@ exporters: log_data_enabled: false service: + telemetry: + metrics: + address: "${SPLUNK_LISTEN_INTERFACE}:8888" extensions: [health_check, http_forwarder, zpages, memory_ballast] pipelines: traces: diff --git a/tests/general/default_config_test.go b/tests/general/default_config_test.go index 69c1598877..aedf89aa5c 100644 --- a/tests/general/default_config_test.go +++ b/tests/general/default_config_test.go @@ -35,9 +35,8 @@ func TestDefaultGatewayConfig(t *testing.T) { "", func(collector testutils.Collector) testutils.Collector { return collector.WithArgs().WithEnv(map[string]string{ - "SPLUNK_LISTEN_INTERFACE": "0.0.0.0", - "SPLUNK_ACCESS_TOKEN": "not.real", - "SPLUNK_REALM": "not.real", + "SPLUNK_ACCESS_TOKEN": "not.real", + "SPLUNK_REALM": "not.real", }) }, ) @@ -198,9 +197,8 @@ func TestDefaultAgentConfig(t *testing.T) { return collector.WithArgs( "--config", "/etc/otel/collector/agent_config.yaml", ).WithEnv(map[string]string{ - "SPLUNK_LISTEN_INTERFACE": "0.0.0.0", - "SPLUNK_ACCESS_TOKEN": "not.real", - "SPLUNK_REALM": "not.real", + "SPLUNK_ACCESS_TOKEN": "not.real", + "SPLUNK_REALM": "not.real", }) }, )