From e5160f1467d64e14bb631ebf57c82eadd7550374 Mon Sep 17 00:00:00 2001 From: Dmitry Anoshin Date: Fri, 6 Dec 2024 11:22:16 -0800 Subject: [PATCH] Deprecate SPLUNK_TRACE_URL env var and don't use it in default configs Deprecate `SPLUNK_TRACE_URL` environment variable and replace with `${SPLUNK_INGEST_URL}/v2/trace`in the default configs. `SPLUNK_TRACE_URL` is still automatically set in the binary computed from on `SPLUNK_REALM` or `SPLUNK_INGEST_URL` environment variables to not break existing configurations. However, it is recommended to update the configurations to use `${SPLUNK_INGEST_URL}/v2/trace` instead. Also, packaging and mass deployment solutions were update to not provide the option to set the Trace URL since it's not being used anymore in the default configs. --- .../workflows/scripts/win-test-services.ps1 | 1 - CHANGELOG.md | 13 ++++ .../config/collector/agent_config.yaml | 3 +- .../collector/upstream_agent_config.yaml | 3 +- cmd/otelcol/fips/config/agent_config.yaml | 3 +- .../ansible/molecule/custom_vars/verify.yml | 7 -- .../molecule/custom_vars/windows-verify.yml | 1 - .../ansible/molecule/default/verify.yml | 7 -- .../molecule/default/windows-verify.yml | 1 - .../with_instrumentation/windows-verify.yml | 1 - deployments/ansible/roles/collector/README.md | 5 -- .../collector/tasks/otel_win_install.yml | 1 - .../ansible/roles/collector/tasks/vars.yml | 1 - .../collector/tasks/win_configurable_vars.yml | 5 -- .../templates/splunk-otel-collector.conf.j2 | 7 -- deployments/chef/attributes/default.rb | 1 - .../recipes/collector_win_config_options.rb | 1 - .../templates/splunk-otel-collector.conf.erb | 3 - .../chef/test/integration/custom_vars/test.rb | 3 - .../chef/test/integration/default/test.rb | 3 - deployments/puppet/README.md | 1 - .../manifests/collector_win_config_options.pp | 1 - deployments/puppet/manifests/init.pp | 1 - .../templates/splunk-otel-collector.conf.erb | 1 - .../collector_config.sls | 3 - internal/settings/settings.go | 78 ++++++++++--------- internal/settings/settings_test.go | 32 +++++++- internal/settings/warning_provider.go | 50 ++++++++++++ internal/settings/warning_provider_test.go | 48 ++++++++++++ .../splunk-otel-collector.nuspec | 1 - .../tools/chocolateyinstall.ps1 | 2 - .../splunk-otel-collector.conf.example | 3 - packaging/installer/install.ps1 | 10 --- packaging/installer/install.sh | 14 ---- packaging/msi/make.ps1 | 1 - packaging/msi/splunk-otel-collector.wxs | 4 - .../Splunk_TA_otel/README/inputs.conf.spec | 3 - .../configs/ta-agent-config.yaml | 3 +- .../configs/ta-agent-to-gateway-config.yaml | 1 - .../Splunk_TA_otel/default/inputs.conf | 1 - .../linux_x86_64/bin/Splunk_TA_otel.sh | 14 ---- .../windows_x86_64/bin/Splunk_TA_otel.cmd | 10 +-- .../cicd-tests/mysql/ta-agent-config.yaml | 3 +- .../tests/deployments/puppet/puppet_test.py | 3 - packaging/tests/deployments/salt/salt_test.py | 1 - packaging/tests/installer_test.py | 1 - tests/msi/msi_test.go | 1 - .../windows/testdata/Dockerfile.iis.server | 2 +- .../testdata/Dockerfile.pipeline.collector | 2 +- 49 files changed, 190 insertions(+), 175 deletions(-) create mode 100644 internal/settings/warning_provider.go create mode 100644 internal/settings/warning_provider_test.go diff --git a/.github/workflows/scripts/win-test-services.ps1 b/.github/workflows/scripts/win-test-services.ps1 index e5dac3ccbf..39025cc132 100644 --- a/.github/workflows/scripts/win-test-services.ps1 +++ b/.github/workflows/scripts/win-test-services.ps1 @@ -44,7 +44,6 @@ $expected_svc_env_vars = @{ "SPLUNK_REALM" = "$realm"; "SPLUNK_API_URL" = "$api_url"; "SPLUNK_INGEST_URL" = "$ingest_url"; - "SPLUNK_TRACE_URL" = "${ingest_url}/v2/trace"; "SPLUNK_HEC_URL" = "${ingest_url}/v1/log"; "SPLUNK_HEC_TOKEN" = "$access_token"; "SPLUNK_BUNDLE_DIR" = "${env:PROGRAMFILES}\Splunk\OpenTelemetry Collector\agent-bundle"; diff --git a/CHANGELOG.md b/CHANGELOG.md index 42f1cf976b..3e49f5f71f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ ## Unreleased +### 🚩Deprecations 🚩 + +- (Splunk) `SPLUNK_TRACE_URL` environment variable is deprecated. It's replaced with `${SPLUNK_INGEST_URL}/v2/trace` + in the default configs. Default value for `SPLUNK_TRACE_URL` is still set in the binary from `SPLUNK_REALM` or + `SPLUNK_INGEST_URL` environment variables to not break existing configurations. However, it is recommended to + update the configurations to use `${SPLUNK_INGEST_URL}/v2/trace` instead. ([#5672](https://github.com/signalfx/splunk-otel-collector/pull/5672)). + +### 🛑 Breaking changes 🛑 + +- (Splunk) Given that `SPLUNK_TRACE_URL` environment variable is deprecated and replaced with + `${SPLUNK_INGEST_URL}/v2/trace` in the default configurations, the option to set the Trace URL has been removed from + all packaging and mass deployment solutions to an avoid confusion. ([#5672](https://github.com/signalfx/splunk-otel-collector/pull/5672)). + ### 🧰 Bug fixes 🧰 - (Splunk) `receiver/journald`: Upgrade journald client libraries in the Collector docker image by taking them from latest Debian image. diff --git a/cmd/otelcol/config/collector/agent_config.yaml b/cmd/otelcol/config/collector/agent_config.yaml index 9a17337505..dd4264997a 100644 --- a/cmd/otelcol/config/collector/agent_config.yaml +++ b/cmd/otelcol/config/collector/agent_config.yaml @@ -10,7 +10,6 @@ # - SPLUNK_HEC_URL: The Splunk HEC endpoint URL, e.g. https://ingest.us0.signalfx.com/v1/log # - SPLUNK_INGEST_URL: The Splunk ingest URL, e.g. https://ingest.us0.signalfx.com # - SPLUNK_LISTEN_INTERFACE: The network interface the agent receivers listen on. -# - SPLUNK_TRACE_URL: The Splunk trace endpoint URL, e.g. https://ingest.us0.signalfx.com/v2/trace extensions: health_check: @@ -129,7 +128,7 @@ exporters: # Traces sapm: access_token: "${SPLUNK_ACCESS_TOKEN}" - endpoint: "${SPLUNK_TRACE_URL}" + endpoint: "${SPLUNK_INGEST_URL}/v2/trace" # Metrics + Events signalfx: access_token: "${SPLUNK_ACCESS_TOKEN}" diff --git a/cmd/otelcol/config/collector/upstream_agent_config.yaml b/cmd/otelcol/config/collector/upstream_agent_config.yaml index 7c50eec230..a263a64941 100644 --- a/cmd/otelcol/config/collector/upstream_agent_config.yaml +++ b/cmd/otelcol/config/collector/upstream_agent_config.yaml @@ -12,7 +12,6 @@ # - SPLUNK_HEC_TOKEN: The Splunk HEC authentication token # - SPLUNK_HEC_URL: The Splunk HEC endpoint URL, e.g. https://ingest.us0.signalfx.com/v1/log # - SPLUNK_INGEST_URL: The Splunk ingest URL, e.g. https://ingest.us0.signalfx.com -# - SPLUNK_TRACE_URL: The Splunk trace endpoint URL, e.g. https://ingest.us0.signalfx.com/v2/trace extensions: health_check: @@ -123,7 +122,7 @@ exporters: # Traces sapm: access_token: "${SPLUNK_ACCESS_TOKEN}" - endpoint: "${SPLUNK_TRACE_URL}" + endpoint: "${SPLUNK_INGEST_URL}/v2/trace" # Metrics + Events signalfx: access_token: "${SPLUNK_ACCESS_TOKEN}" diff --git a/cmd/otelcol/fips/config/agent_config.yaml b/cmd/otelcol/fips/config/agent_config.yaml index 10e2ca2611..3c5761fc10 100644 --- a/cmd/otelcol/fips/config/agent_config.yaml +++ b/cmd/otelcol/fips/config/agent_config.yaml @@ -8,7 +8,6 @@ # - SPLUNK_HEC_URL: The Splunk HEC endpoint URL, e.g. https://ingest.us0.signalfx.com/v1/log # - SPLUNK_INGEST_URL: The Splunk ingest URL, e.g. https://ingest.us0.signalfx.com # - SPLUNK_LISTEN_INTERFACE: The network interface the agent receivers listen on. -# - SPLUNK_TRACE_URL: The Splunk trace endpoint URL, e.g. https://ingest.us0.signalfx.com/v2/trace extensions: health_check: @@ -119,7 +118,7 @@ exporters: # Traces sapm: access_token: "${SPLUNK_ACCESS_TOKEN}" - endpoint: "${SPLUNK_TRACE_URL}" + endpoint: "${SPLUNK_INGEST_URL}/v2/trace" # Metrics + Events signalfx: access_token: "${SPLUNK_ACCESS_TOKEN}" diff --git a/deployments/ansible/molecule/custom_vars/verify.yml b/deployments/ansible/molecule/custom_vars/verify.yml index 6f484ffa08..0eff6874d9 100644 --- a/deployments/ansible/molecule/custom_vars/verify.yml +++ b/deployments/ansible/molecule/custom_vars/verify.yml @@ -37,13 +37,6 @@ state: present check_mode: yes - - name: Assert SPLUNK_TRACE_URL env var is set - ansible.builtin.lineinfile: - line: SPLUNK_TRACE_URL=https://fake-splunk-ingest.com/v2/trace - dest: /etc/otel/collector/splunk-otel-collector.conf - state: present - check_mode: yes - - name: Assert SPLUNK_HEC_URL env var is set ansible.builtin.lineinfile: line: SPLUNK_HEC_URL=https://fake-splunk-ingest.com/v1/log diff --git a/deployments/ansible/molecule/custom_vars/windows-verify.yml b/deployments/ansible/molecule/custom_vars/windows-verify.yml index def2b07c3e..b73a921820 100644 --- a/deployments/ansible/molecule/custom_vars/windows-verify.yml +++ b/deployments/ansible/molecule/custom_vars/windows-verify.yml @@ -8,7 +8,6 @@ SPLUNK_CONFIG: '{{ ansible_env.ProgramData }}\Splunk\OpenTelemetry Collector\custom_config.yml' SPLUNK_INGEST_URL: https://fake-splunk-ingest.com SPLUNK_API_URL: https://fake-splunk-api.com - SPLUNK_TRACE_URL: https://fake-splunk-ingest.com/v2/trace SPLUNK_HEC_URL: https://fake-splunk-hec.com SPLUNK_HEC_TOKEN: fake-hec-token SPLUNK_MEMORY_TOTAL_MIB: "256" diff --git a/deployments/ansible/molecule/default/verify.yml b/deployments/ansible/molecule/default/verify.yml index c10b64ed13..0108559e4e 100644 --- a/deployments/ansible/molecule/default/verify.yml +++ b/deployments/ansible/molecule/default/verify.yml @@ -43,13 +43,6 @@ state: present check_mode: yes - - name: Assert SPLUNK_TRACE_URL env var is set - ansible.builtin.lineinfile: - line: SPLUNK_TRACE_URL=https://ingest.fake-realm.signalfx.com/v2/trace - dest: /etc/otel/collector/splunk-otel-collector.conf - state: present - check_mode: yes - - name: Assert SPLUNK_HEC_URL env var is set ansible.builtin.lineinfile: line: SPLUNK_HEC_URL=https://ingest.fake-realm.signalfx.com/v1/log diff --git a/deployments/ansible/molecule/default/windows-verify.yml b/deployments/ansible/molecule/default/windows-verify.yml index aed0c976a9..c83c50afb1 100644 --- a/deployments/ansible/molecule/default/windows-verify.yml +++ b/deployments/ansible/molecule/default/windows-verify.yml @@ -12,7 +12,6 @@ SPLUNK_HEC_TOKEN: fake-token SPLUNK_HEC_URL: https://ingest.fake-realm.signalfx.com/v1/log SPLUNK_INGEST_URL: https://ingest.fake-realm.signalfx.com - SPLUNK_TRACE_URL: https://ingest.fake-realm.signalfx.com/v2/trace tasks: - name: Check splunk-otel-collector service ansible.windows.win_service: diff --git a/deployments/ansible/molecule/with_instrumentation/windows-verify.yml b/deployments/ansible/molecule/with_instrumentation/windows-verify.yml index 856cfbc562..654b1cf439 100644 --- a/deployments/ansible/molecule/with_instrumentation/windows-verify.yml +++ b/deployments/ansible/molecule/with_instrumentation/windows-verify.yml @@ -12,7 +12,6 @@ SPLUNK_HEC_TOKEN: fake-token SPLUNK_HEC_URL: https://ingest.fake-realm.signalfx.com/v1/log SPLUNK_INGEST_URL: https://ingest.fake-realm.signalfx.com - SPLUNK_TRACE_URL: https://ingest.fake-realm.signalfx.com/v2/trace iis_reg_values: COR_ENABLE_PROFILING: "1" COR_PROFILER: "{B4C89B0F-9908-4F73-9F59-0D77C5A06874}" diff --git a/deployments/ansible/roles/collector/README.md b/deployments/ansible/roles/collector/README.md index 6d29b51b79..e981110817 100644 --- a/deployments/ansible/roles/collector/README.md +++ b/deployments/ansible/roles/collector/README.md @@ -64,11 +64,6 @@ $> ansible-playbook playbook.yaml -e start_service=false The `SPLUNK_API_URL` environment variable will be set with this value for the collector service. (**default:** `https://api.{{ splunk_realm }}.signalfx.com`) -- `splunk_trace_url`: The Splunk trace endpoint URL, e.g. - `https://ingest.us0.signalfx.com/v2/trace`. The `SPLUNK_TRACE_URL` environment - variable will be set with this value for the collector service. (**default:** - `{{ splunk_ingest_url }}/v2/trace`) - - `splunk_hec_url`: The Splunk HEC endpoint URL, e.g. `https://ingest.us0.signalfx.com/v1/log`. The `SPLUNK_HEC_URL` environment variable will be set with this value for the collector service. (**default:** diff --git a/deployments/ansible/roles/collector/tasks/otel_win_install.yml b/deployments/ansible/roles/collector/tasks/otel_win_install.yml index ddeb11bdcf..b01b0e897b 100644 --- a/deployments/ansible/roles/collector/tasks/otel_win_install.yml +++ b/deployments/ansible/roles/collector/tasks/otel_win_install.yml @@ -55,7 +55,6 @@ - "{{ 'SPLUNK_MEMORY_TOTAL_MIB=' + (splunk_memory_total_mib | string) if (splunk_memory_total_mib | string) != '' else '' }}" - "{{ 'SPLUNK_REALM=' + splunk_realm if splunk_realm != '' else '' }}" - - "{{ 'SPLUNK_TRACE_URL=' + splunk_trace_url if splunk_trace_url != '' else '' }}" - name: Filter out undefined arguments when: splunk_collector_msi_is_configurable is defined diff --git a/deployments/ansible/roles/collector/tasks/vars.yml b/deployments/ansible/roles/collector/tasks/vars.yml index ffb89559b1..cb7bf8ef05 100644 --- a/deployments/ansible/roles/collector/tasks/vars.yml +++ b/deployments/ansible/roles/collector/tasks/vars.yml @@ -87,6 +87,5 @@ SPLUNK_LISTEN_INTERFACE: "{{ splunk_listen_interface if splunk_listen_interface != '' else omit }}" SPLUNK_MEMORY_TOTAL_MIB: "{{ splunk_memory_total_mib }}" SPLUNK_REALM: "{{ splunk_realm }}" - SPLUNK_TRACE_URL: "{{ splunk_trace_url }}" splunk_otel_collector_service_registry_key: HKLM:\SYSTEM\CurrentControlSet\Services\splunk-otel-collector when: ansible_os_family == "Windows" diff --git a/deployments/ansible/roles/collector/tasks/win_configurable_vars.yml b/deployments/ansible/roles/collector/tasks/win_configurable_vars.yml index 3b4796d102..1e5600b60c 100644 --- a/deployments/ansible/roles/collector/tasks/win_configurable_vars.yml +++ b/deployments/ansible/roles/collector/tasks/win_configurable_vars.yml @@ -9,11 +9,6 @@ splunk_api_url: https://api.{{splunk_realm}}.signalfx.com when: splunk_api_url is not defined or (splunk_api_url | trim) == "" -- name: Set default trace url - set_fact: - splunk_trace_url: "{{splunk_ingest_url}}/v2/trace" - when: splunk_trace_url is not defined or (splunk_trace_url | trim) == "" - - name: Set default hec url set_fact: splunk_hec_url: "{{splunk_ingest_url}}/v1/log" diff --git a/deployments/ansible/roles/collector/templates/splunk-otel-collector.conf.j2 b/deployments/ansible/roles/collector/templates/splunk-otel-collector.conf.j2 index 329abca4f7..f7fe833ab4 100644 --- a/deployments/ansible/roles/collector/templates/splunk-otel-collector.conf.j2 +++ b/deployments/ansible/roles/collector/templates/splunk-otel-collector.conf.j2 @@ -3,13 +3,6 @@ SPLUNK_ACCESS_TOKEN={{ splunk_access_token }} SPLUNK_REALM={{ splunk_realm }} SPLUNK_API_URL={{ splunk_api_url | default("https://api." + splunk_realm + ".signalfx.com") }} SPLUNK_INGEST_URL={{ splunk_ingest_url | default("https://ingest." + splunk_realm + ".signalfx.com") }} -{% if splunk_trace_url is defined and splunk_trace_url %} -SPLUNK_TRACE_URL={{ splunk_trace_url }} -{% elif splunk_ingest_url is defined and splunk_ingest_url %} -SPLUNK_TRACE_URL={{ splunk_ingest_url + "/v2/trace" }} -{% else %} -SPLUNK_TRACE_URL={{ "https://ingest." + splunk_realm + ".signalfx.com/v2/trace" }} -{% endif %} {% if splunk_hec_url is defined and splunk_hec_url %} SPLUNK_HEC_URL={{ splunk_hec_url }} {% elif splunk_ingest_url is defined and splunk_ingest_url %} diff --git a/deployments/chef/attributes/default.rb b/deployments/chef/attributes/default.rb index 206a77d25b..945701ea8c 100644 --- a/deployments/chef/attributes/default.rb +++ b/deployments/chef/attributes/default.rb @@ -16,7 +16,6 @@ default['splunk_otel_collector']['splunk_api_url'] = "https://api.#{node['splunk_otel_collector']['splunk_realm']}.signalfx.com" default['splunk_otel_collector']['splunk_ingest_url'] = "https://ingest.#{node['splunk_otel_collector']['splunk_realm']}.signalfx.com" -default['splunk_otel_collector']['splunk_trace_url'] = "#{node['splunk_otel_collector']['splunk_ingest_url']}/v2/trace" default['splunk_otel_collector']['splunk_hec_url'] = "#{node['splunk_otel_collector']['splunk_ingest_url']}/v1/log" default['splunk_otel_collector']['splunk_hec_token'] = "#{node['splunk_otel_collector']['splunk_access_token']}" default['splunk_otel_collector']['splunk_memory_total_mib'] = '512' diff --git a/deployments/chef/recipes/collector_win_config_options.rb b/deployments/chef/recipes/collector_win_config_options.rb index 2ad9247f55..d421813a3e 100644 --- a/deployments/chef/recipes/collector_win_config_options.rb +++ b/deployments/chef/recipes/collector_win_config_options.rb @@ -12,7 +12,6 @@ { name: 'SPLUNK_INGEST_URL', type: :string, data: node['splunk_otel_collector']['splunk_ingest_url'].to_s }, { name: 'SPLUNK_REALM', type: :string, data: node['splunk_otel_collector']['splunk_realm'].to_s }, { name: 'SPLUNK_MEMORY_TOTAL_MIB', type: :string, data: node['splunk_otel_collector']['splunk_memory_total_mib'].to_s }, - { name: 'SPLUNK_TRACE_URL', type: :string, data: node['splunk_otel_collector']['splunk_trace_url'].to_s }, ] unless node['splunk_otel_collector']['gomemlimit'].to_s.strip.empty? diff --git a/deployments/chef/templates/splunk-otel-collector.conf.erb b/deployments/chef/templates/splunk-otel-collector.conf.erb index 04b00ced8f..aa49ad9bdd 100644 --- a/deployments/chef/templates/splunk-otel-collector.conf.erb +++ b/deployments/chef/templates/splunk-otel-collector.conf.erb @@ -13,9 +13,6 @@ SPLUNK_API_URL=<%= node['splunk_otel_collector']['splunk_api_url'] %> # Splunk ingest endpoint URL. SPLUNK_INGEST_URL=<%= node['splunk_otel_collector']['splunk_ingest_url'] %> -# Splunk trace endpoint URL. -SPLUNK_TRACE_URL=<%= node['splunk_otel_collector']['splunk_trace_url'] %> - # Splunk HEC endpoint URL. SPLUNK_HEC_URL=<%= node['splunk_otel_collector']['splunk_hec_url'] %> diff --git a/deployments/chef/test/integration/custom_vars/test.rb b/deployments/chef/test/integration/custom_vars/test.rb index af8a5ab144..2e34d27980 100644 --- a/deployments/chef/test/integration/custom_vars/test.rb +++ b/deployments/chef/test/integration/custom_vars/test.rb @@ -2,7 +2,6 @@ splunk_realm = 'test' splunk_api_url = 'https://fake-splunk-api.com' splunk_ingest_url = 'https://fake-splunk-ingest.com' -splunk_trace_url = "#{splunk_ingest_url}/v2/trace" splunk_hec_url = "#{splunk_ingest_url}/v1/log" splunk_hec_token = 'fake-hec-token' splunk_memory_total = '256' @@ -29,7 +28,6 @@ { name: 'SPLUNK_LISTEN_INTERFACE', type: :string, data: splunk_listen_interface }, { name: 'SPLUNK_MEMORY_TOTAL_MIB', type: :string, data: splunk_memory_total }, { name: 'SPLUNK_REALM', type: :string, data: splunk_realm }, - { name: 'SPLUNK_TRACE_URL', type: :string, data: splunk_trace_url }, { name: 'MY_CUSTOM_VAR1', type: :string, data: 'value1' }, { name: 'MY_CUSTOM_VAR2', type: :string, data: 'value2' }, ] @@ -64,7 +62,6 @@ its('content') { should match /^SPLUNK_LISTEN_INTERFACE=#{splunk_listen_interface}$/ } its('content') { should match /^SPLUNK_MEMORY_TOTAL_MIB=#{splunk_memory_total}$/ } its('content') { should match /^SPLUNK_REALM=test$/ } - its('content') { should match /^SPLUNK_TRACE_URL=#{splunk_trace_url}$/ } its('content') { should match /^MY_CUSTOM_VAR1=value1$/ } its('content') { should match /^MY_CUSTOM_VAR2=value2$/ } end diff --git a/deployments/chef/test/integration/default/test.rb b/deployments/chef/test/integration/default/test.rb index fe51507a9c..ab85c568be 100644 --- a/deployments/chef/test/integration/default/test.rb +++ b/deployments/chef/test/integration/default/test.rb @@ -2,7 +2,6 @@ splunk_realm = 'test' splunk_api_url = "https://api.#{splunk_realm}.signalfx.com" splunk_ingest_url = "https://ingest.#{splunk_realm}.signalfx.com" -splunk_trace_url = "#{splunk_ingest_url}/v2/trace" splunk_hec_url = "#{splunk_ingest_url}/v1/log" splunk_hec_token = splunk_access_token splunk_memory_total = '512' @@ -27,7 +26,6 @@ { name: 'SPLUNK_INGEST_URL', type: :string, data: splunk_ingest_url }, { name: 'SPLUNK_MEMORY_TOTAL_MIB', type: :string, data: splunk_memory_total }, { name: 'SPLUNK_REALM', type: :string, data: splunk_realm }, - { name: 'SPLUNK_TRACE_URL', type: :string, data: splunk_trace_url }, ] collector_env_vars_strings = [] @@ -57,7 +55,6 @@ its('content') { should match /^SPLUNK_INGEST_URL=#{splunk_ingest_url}$/ } its('content') { should match /^SPLUNK_MEMORY_TOTAL_MIB=#{splunk_memory_total}$/ } its('content') { should match /^SPLUNK_REALM=test$/ } - its('content') { should match /^SPLUNK_TRACE_URL=#{splunk_trace_url}$/ } its('content') { should_not match /^SPLUNK_LISTEN_INTERFACE=.*$/ } end describe file('/etc/systemd/system/splunk-otel-collector.service.d/service-owner.conf') do diff --git a/deployments/puppet/README.md b/deployments/puppet/README.md index e2395d0417..b466614bc1 100644 --- a/deployments/puppet/README.md +++ b/deployments/puppet/README.md @@ -60,7 +60,6 @@ This class accepts the following parameters: | `splunk_realm` | **Required**: Which realm to send the data to, e.g. `us0`. The Splunk ingest and API URLs will be inferred by this value. The `SPLUNK_REALM` environment variable will be set with this value for the collector service. | None | | `splunk_ingest_url` | Set the Splunk ingest URL explicitly instead of the URL inferred by the `$splunk_realm` parameter. The `SPLUNK_INGEST_URL` environment variable will be set with this value for the collector service. | `https://ingest.${splunk_realm}.signalfx.com` | | `splunk_api_url` | Set the Splunk API URL explicitly instead of the URL inferred by the `$splunk_realm` parameter. The `SPLUNK_API_URL` environment variable will be set with this value for the collector service. | `https://api.${splunk_realm}.signalfx.com` | -| `splunk_trace_url` | Set the Splunk trace endpoint URL explicitly instead of the URL inferred by the `$splunk_ingest_url` parameter. The `SPLUNK_TRACE_URL` environment variable will be set with this value for the collector service. | `${splunk_ingest_url}/v2/trace` | | `splunk_hec_url` | Set the Splunk HEC endpoint URL explicitly instead of the URL inferred by the `$splunk_ingest_url` parameter. The `SPLUNK_HEC_URL` environment variable will be set with this value for the collector service. | `${splunk_ingest_url}/v1/log` | | `splunk_hec_token` | Set the Splunk HEC authentication token if different than `$splunk_access_token`. The `SPLUNK_HEC_TOKEN` environment variable will be set with this value for the collector service. | `$splunk_access_token` | | `splunk_bundle_dir` | The path to the [Smart Agent bundle directory](https://github.com/signalfx/splunk-otel-collector/blob/main/pkg/extension/smartagentextension/README.md). The default path is provided by the collector package. If the specified path is changed from the default value, the path should be an existing directory on the node. The `SPLUNK_BUNDLE_DIR` environment variable will be set to this value for the collector service. | Linux: `/usr/lib/splunk-otel-collector/agent-bundle`
Windows: `%PROGRAMFILES%\Splunk\OpenTelemetry Collector\agent-bundle` | diff --git a/deployments/puppet/manifests/collector_win_config_options.pp b/deployments/puppet/manifests/collector_win_config_options.pp index 93d5c5102a..f1875b1b44 100644 --- a/deployments/puppet/manifests/collector_win_config_options.pp +++ b/deployments/puppet/manifests/collector_win_config_options.pp @@ -11,7 +11,6 @@ 'SPLUNK_INGEST_URL' => $splunk_otel_collector::splunk_ingest_url, 'SPLUNK_MEMORY_TOTAL_MIB' => $splunk_otel_collector::splunk_memory_total_mib, 'SPLUNK_REALM' => $splunk_otel_collector::splunk_realm, - 'SPLUNK_TRACE_URL' => $splunk_otel_collector::splunk_trace_url, } $gomemlimit = if ($splunk_otel_collector::collector_version == 'latest' or diff --git a/deployments/puppet/manifests/init.pp b/deployments/puppet/manifests/init.pp index 8a7711d2f7..e62d7d9550 100644 --- a/deployments/puppet/manifests/init.pp +++ b/deployments/puppet/manifests/init.pp @@ -4,7 +4,6 @@ $splunk_realm = '', # required $splunk_ingest_url = "https://ingest.${splunk_realm}.signalfx.com", $splunk_api_url = "https://api.${splunk_realm}.signalfx.com", - $splunk_trace_url = "${splunk_ingest_url}/v2/trace", $splunk_hec_url = "${splunk_ingest_url}/v1/log", $splunk_hec_token = $splunk_access_token, $splunk_bundle_dir = $splunk_otel_collector::params::splunk_bundle_dir, diff --git a/deployments/puppet/templates/splunk-otel-collector.conf.erb b/deployments/puppet/templates/splunk-otel-collector.conf.erb index c9ad939dab..ec8fc27338 100644 --- a/deployments/puppet/templates/splunk-otel-collector.conf.erb +++ b/deployments/puppet/templates/splunk-otel-collector.conf.erb @@ -11,7 +11,6 @@ SPLUNK_MEMORY_TOTAL_MIB=<%= @splunk_memory_total_mib %> SPLUNK_LISTEN_INTERFACE=<%= @splunk_listen_interface %> <% end -%> SPLUNK_REALM=<%= @splunk_realm %> -SPLUNK_TRACE_URL=<%= @splunk_trace_url %> <% unless @gomemlimit.to_s.strip.empty? -%> GOMEMLIMIT=<%= @gomemlimit %> <% end -%> diff --git a/deployments/salt/splunk-otel-collector/collector_config.sls b/deployments/salt/splunk-otel-collector/collector_config.sls index 240ab19efc..3d7352aa08 100644 --- a/deployments/salt/splunk-otel-collector/collector_config.sls +++ b/deployments/salt/splunk-otel-collector/collector_config.sls @@ -10,8 +10,6 @@ {% set splunk_ingest_url = salt['pillar.get']('splunk-otel-collector:splunk_ingest_url', 'https://ingest.' + splunk_realm + '.signalfx.com') %} -{% set splunk_trace_url = salt['pillar.get']('splunk-otel-collector:splunk_trace_url', splunk_ingest_url + '/v2/trace') %} - {% set splunk_hec_url = salt['pillar.get']('splunk-otel-collector:splunk_hec_url', splunk_ingest_url + '/v1/log') %} {% set splunk_hec_token = salt['pillar.get']('splunk-otel-collector:splunk_hec_token', splunk_access_token) %} @@ -38,7 +36,6 @@ SPLUNK_REALM={{ splunk_realm }} SPLUNK_API_URL={{ splunk_api_url }} SPLUNK_INGEST_URL={{ splunk_ingest_url }} - SPLUNK_TRACE_URL={{ splunk_trace_url }} SPLUNK_HEC_URL={{ splunk_hec_url }} SPLUNK_HEC_TOKEN={{ splunk_hec_token }} SPLUNK_MEMORY_TOTAL_MIB={{ splunk_memory_total_mib }} diff --git a/internal/settings/settings.go b/internal/settings/settings.go index 2be365de35..f5f8100b72 100644 --- a/internal/settings/settings.go +++ b/internal/settings/settings.go @@ -34,6 +34,9 @@ import ( "github.com/signalfx/splunk-otel-collector/internal/confmapprovider/discovery" ) +// envVarWarnings is a map of warnings to be logged when a specific environment variable is used in a user config. +type envVarWarnings map[string]string + const ( APIURLEnvVar = "SPLUNK_API_URL" ConfigEnvVar = "SPLUNK_CONFIG" @@ -51,7 +54,9 @@ const ( MemTotalEnvVar = "SPLUNK_MEMORY_TOTAL_MIB" RealmEnvVar = "SPLUNK_REALM" // nolint:gosec - TokenEnvVar = "SPLUNK_ACCESS_TOKEN" // this isn't a hardcoded token + TokenEnvVar = "SPLUNK_ACCESS_TOKEN" // this isn't a hardcoded token + + // Deprecated: SPLUNK_TRACE_URL env var is deprecated, SPLUNK_REALM or SPLUNK_INGEST_URL should be used instead. TraceIngestURLEnvVar = "SPLUNK_TRACE_URL" DefaultGatewayConfig = "/etc/otel/collector/gateway_config.yaml" @@ -81,20 +86,30 @@ var DefaultAgentConfigWindows = func() string { var defaultFeatureGates = []string{} type Settings struct { - discovery *discovery.Provider - configPaths *stringArrayFlagValue - setOptionArguments *stringArrayFlagValue - configDir *stringPointerFlagValue - confMapProviderFactories []confmap.ProviderFactory - discoveryPropertiesFile *stringPointerFlagValue - setProperties []string - colCoreArgs []string - discoveryProperties []string - versionFlag bool - noConvertConfig bool - configD bool - discoveryMode bool - dryRun bool + discovery *discovery.Provider + envVarWarnings envVarWarnings + configPaths *stringArrayFlagValue + setOptionArguments *stringArrayFlagValue + configDir *stringPointerFlagValue + discoveryPropertiesFile *stringPointerFlagValue + setProperties []string + colCoreArgs []string + discoveryProperties []string + versionFlag bool + noConvertConfig bool + configD bool + discoveryMode bool + dryRun bool +} + +func newSettings() *Settings { + return &Settings{ + configPaths: new(stringArrayFlagValue), + setOptionArguments: new(stringArrayFlagValue), + configDir: new(stringPointerFlagValue), + discoveryPropertiesFile: new(stringPointerFlagValue), + envVarWarnings: make(envVarWarnings), + } } func New(args []string) (*Settings, error) { @@ -174,18 +189,9 @@ func getConfigDir(f *Settings) string { // ConfMapProviderFactories returns list of confmap.ProviderFactory for the collector core service. func (s *Settings) ConfMapProviderFactories() []confmap.ProviderFactory { - return s.confMapProviderFactories -} - -func loadConfMapProviders(s *Settings) error { - var err error - if s.discovery, err = discovery.New(); err != nil { - return fmt.Errorf("failed to create discovery provider: %w", err) - } - - s.confMapProviderFactories = []confmap.ProviderFactory{ + return []confmap.ProviderFactory{ // Upstream providers - envprovider.NewFactory(), + &warningProviderFactory{ProviderFactory: envprovider.NewFactory(), warnings: s.envVarWarnings}, fileprovider.NewFactory(), // Custom providers @@ -194,7 +200,6 @@ func loadConfMapProviders(s *Settings) error { s.discovery.DiscoveryModeProviderFactory(), s.discovery.PropertiesFileProviderFactory(), } - return nil } // ConfMapConverterFactories returns confmap.Converters for the collector core service. @@ -229,15 +234,11 @@ func (s *Settings) IsDryRun() bool { func parseArgs(args []string) (*Settings, error) { flagSet := flag.NewFlagSet("otelcol", flag.ContinueOnError) - settings := &Settings{ - configPaths: new(stringArrayFlagValue), - setOptionArguments: new(stringArrayFlagValue), - configDir: new(stringPointerFlagValue), - discoveryPropertiesFile: new(stringPointerFlagValue), - } + settings := newSettings() - if err := loadConfMapProviders(settings); err != nil { - return nil, fmt.Errorf("failed loading confmap.Providers: %w", err) + var err error + if settings.discovery, err = discovery.New(); err != nil { + return nil, fmt.Errorf("failed to create discovery provider: %w", err) } flagSet.Var(settings.configPaths, "config", "Locations to the config file(s), "+ @@ -402,6 +403,13 @@ func setDefaultEnvVars(s *Settings) error { if err := os.Setenv(e, v); err != nil { return err } + // Add a deprecation warning if SPLUNK_TRACE_URL is being used in user config. + if e == TraceIngestURLEnvVar { + s.envVarWarnings[TraceIngestURLEnvVar] = fmt.Sprintf( + "%q environment variable is deprecated and will not be set automatically in future"+ + " releases. Please update your config to use %q or %q instead. ", TraceIngestURLEnvVar, + RealmEnvVar, IngestURLEnvVar) + } if e == ListenInterfaceEnvVar { log.Printf("set %q to %q", e, v) } diff --git a/internal/settings/settings_test.go b/internal/settings/settings_test.go index 0f00cccf79..8edc676e0f 100644 --- a/internal/settings/settings_test.go +++ b/internal/settings/settings_test.go @@ -261,7 +261,10 @@ func TestSetDefaultEnvVarsSetsURLsFromRealm(t *testing.T) { realm := "us1" os.Setenv("SPLUNK_REALM", realm) - require.NoError(t, setDefaultEnvVars(nil)) + set := newSettings() + require.NoError(t, setDefaultEnvVars(set)) + assert.Equal(t, 1, len(set.envVarWarnings)) + assert.Contains(t, set.envVarWarnings["SPLUNK_TRACE_URL"], `"SPLUNK_TRACE_URL" environment variable is deprecated`) expectedEnvVars := [][]string{ {"SPLUNK_API_URL", fmt.Sprintf("https://api.%s.signalfx.com", realm)}, @@ -276,6 +279,24 @@ func TestSetDefaultEnvVarsSetsURLsFromRealm(t *testing.T) { } } +func TestNoWarningsIfTraceURLSetExplicitly(t *testing.T) { + t.Cleanup(clearEnv(t)) + + os.Setenv("SPLUNK_REALM", "us1") + os.Setenv("SPLUNK_TRACE_URL", "https://ingest.trace-realm.signalfx.com/v2/trace") + set := newSettings() + require.NoError(t, setDefaultEnvVars(set)) + assert.Equal(t, 0, len(set.envVarWarnings)) + + val, ok := os.LookupEnv("SPLUNK_INGEST_URL") + assert.True(t, ok) + assert.Equal(t, "https://ingest.us1.signalfx.com", val) + + val, ok = os.LookupEnv("SPLUNK_TRACE_URL") + assert.True(t, ok) + assert.Equal(t, "https://ingest.trace-realm.signalfx.com/v2/trace", val) +} + func TestSetDefaultEnvVarsSetsHECTokenFromAccessTokenEnvVar(t *testing.T) { t.Cleanup(clearEnv(t)) @@ -292,7 +313,10 @@ func TestSetDefaultEnvVarsSetsTraceURLFromIngestURL(t *testing.T) { t.Cleanup(clearEnv(t)) os.Setenv("SPLUNK_INGEST_URL", "https://ingest.fake-realm.signalfx.com/") - require.NoError(t, setDefaultEnvVars(nil)) + set := newSettings() + require.NoError(t, setDefaultEnvVars(set)) + assert.Equal(t, 1, len(set.envVarWarnings)) + assert.Contains(t, set.envVarWarnings["SPLUNK_TRACE_URL"], `"SPLUNK_TRACE_URL" environment variable is deprecated`) val, ok := os.LookupEnv("SPLUNK_TRACE_URL") assert.True(t, ok) @@ -306,7 +330,7 @@ func TestSetDefaultEnvVarsRespectsSetEnvVars(t *testing.T) { someValue := "some.value" for _, v := range envVars { os.Setenv(v, someValue) - require.NoError(t, setDefaultEnvVars(nil)) + require.NoError(t, setDefaultEnvVars(newSettings())) val, ok := os.LookupEnv(v) assert.True(t, ok, v[0]) assert.Equal(t, someValue, val) @@ -314,7 +338,7 @@ func TestSetDefaultEnvVarsRespectsSetEnvVars(t *testing.T) { for _, v := range envVars { os.Setenv(v, "") - require.NoError(t, setDefaultEnvVars(nil)) + require.NoError(t, setDefaultEnvVars(newSettings())) val, ok := os.LookupEnv(v) assert.True(t, ok, v[0]) assert.Empty(t, val) diff --git a/internal/settings/warning_provider.go b/internal/settings/warning_provider.go new file mode 100644 index 0000000000..a323532162 --- /dev/null +++ b/internal/settings/warning_provider.go @@ -0,0 +1,50 @@ +// Copyright Splunk, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package settings + +import ( + "context" + + "go.opentelemetry.io/collector/confmap" + "go.uber.org/zap" +) + +// warningProviderFactory is a wrapper for a confmap.ProviderFactory that logs warnings for particular URIs. +type warningProviderFactory struct { + confmap.ProviderFactory + warnings map[string]string +} + +func (wpf *warningProviderFactory) Create(set confmap.ProviderSettings) confmap.Provider { + return &warningProvider{ + Provider: wpf.ProviderFactory.Create(set), + warnings: wpf.warnings, + logger: set.Logger, + } +} + +type warningProvider struct { + confmap.Provider + warnings map[string]string + logger *zap.Logger +} + +func (wp *warningProvider) Retrieve(ctx context.Context, uri string, watcher confmap.WatcherFunc) (*confmap.Retrieved, error) { + val := uri[len(wp.Provider.Scheme())+1:] + if warning, ok := wp.warnings[val]; ok { + wp.logger.Warn(warning) + } + return wp.Provider.Retrieve(ctx, uri, watcher) +} diff --git a/internal/settings/warning_provider_test.go b/internal/settings/warning_provider_test.go new file mode 100644 index 0000000000..f11ef30b2c --- /dev/null +++ b/internal/settings/warning_provider_test.go @@ -0,0 +1,48 @@ +// Copyright Splunk, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package settings + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/confmap/provider/envprovider" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" +) + +func TestWarningProviderRetrieve(t *testing.T) { + t.Setenv("TEST", "test-value") + wfp := &warningProviderFactory{ + ProviderFactory: envprovider.NewFactory(), + warnings: map[string]string{"TEST": "This is a test warning"}, + } + + logCore, logObserver := observer.New(zap.WarnLevel) + logger := zap.New(logCore) + wp := wfp.Create(confmap.ProviderSettings{Logger: logger}) + + retrieved, err := wp.Retrieve(context.Background(), "env:TEST", nil) + require.NoError(t, err) + rawVal, rErr := retrieved.AsRaw() + require.NoError(t, rErr) + assert.Equal(t, "test-value", rawVal.(string)) + + assert.Equal(t, 1, logObserver.Len()) + assert.Equal(t, "This is a test warning", logObserver.All()[0].Message) +} diff --git a/packaging/choco/splunk-otel-collector/splunk-otel-collector.nuspec b/packaging/choco/splunk-otel-collector/splunk-otel-collector.nuspec index 661e297f78..8af46d1471 100644 --- a/packaging/choco/splunk-otel-collector/splunk-otel-collector.nuspec +++ b/packaging/choco/splunk-otel-collector/splunk-otel-collector.nuspec @@ -16,7 +16,6 @@ The following package parameters are available: * `/SPLUNK_API_URL`: URL of the Splunk API endpoint (e.g. `https://api.us1.signalfx.com`). Default value is `https://api.$SPLUNK_REALM.signalfx.com`. * `/SPLUNK_HEC_TOKEN`: The Splunk HEC authentication token. Default value is the same as `SPLUNK_ACCESS_TOKEN`. * `/SPLUNK_HEC_URL`: URL of the Splunk HEC endpoint (e.g. `https://ingest.us1.signalfx.com/v1/log`). Default value is `https://ingest.$SPLUNK_REALM.signalfx.com/v1/log` - * `/SPLUNK_TRACE_URL`: URL of the Splunk trace endpoint (e.g. `https://ingest.us1.signalfx.com/v2/trace`). Default value is `https://ingest.$SPLUNK_REALM.signalfx.com/v2/trace` * `/SPLUNK_BUNDLE_DIR`: The path to the Smart Agent bundle directory for the `smartagent` receiver and extension. The default path is provided by the Collector package. If the specified path is changed from the default value, the path should be an existing directory on the system. Default value is `\Program Files\Splunk\OpenTelemetry Collector\agent-bundle`. * `/SPLUNK_LISTEN_INTERFACE`: The network interface the collector receivers will listen on. Default value is `127.0.0.1` for agent mode and `0.0.0.0` for gateway. * `/MODE`: This parameter is used for setting the Collector configuration file to `\ProgramData\Splunk\OpenTelemetry Collector\agent_config.yaml` or `\ProgramData\Splunk\OpenTelemetry Collector\gateway_config.yaml`. Possible values are `agent` and `gateway`. Default value is `agent`. diff --git a/packaging/choco/splunk-otel-collector/tools/chocolateyinstall.ps1 b/packaging/choco/splunk-otel-collector/tools/chocolateyinstall.ps1 index 4420128708..037a88cec2 100644 --- a/packaging/choco/splunk-otel-collector/tools/chocolateyinstall.ps1 +++ b/packaging/choco/splunk-otel-collector/tools/chocolateyinstall.ps1 @@ -42,7 +42,6 @@ $env_var_names = @( "SPLUNK_API_URL", "SPLUNK_HEC_TOKEN", "SPLUNK_HEC_URL", - "SPLUNK_TRACE_URL", "SPLUNK_MEMORY_TOTAL_MIB", "SPLUNK_BUNDLE_DIR", "SPLUNK_LISTEN_INTERFACE" @@ -104,7 +103,6 @@ set_env_var_value_from_package_params $env_vars $pp "SPLUNK_INGEST_URL" set_env_var_value_from_package_params $env_vars $pp "SPLUNK_API_URL" "https://api.$realm.signalfx.com" set_env_var_value_from_package_params $env_vars $pp "SPLUNK_HEC_TOKEN" $env_vars["SPLUNK_ACCESS_TOKEN"] set_env_var_value_from_package_params $env_vars $pp "SPLUNK_HEC_URL" "https://ingest.$realm.signalfx.com/v1/log" -set_env_var_value_from_package_params $env_vars $pp "SPLUNK_TRACE_URL" "https://ingest.$realm.signalfx.com/v2/trace" set_env_var_value_from_package_params $env_vars $pp "SPLUNK_MEMORY_TOTAL_MIB" "512" set_env_var_value_from_package_params $env_vars $pp "SPLUNK_BUNDLE_DIR" "$installation_path\agent-bundle" diff --git a/packaging/fpm/etc/otel/collector/splunk-otel-collector.conf.example b/packaging/fpm/etc/otel/collector/splunk-otel-collector.conf.example index d253683183..399ef541d1 100644 --- a/packaging/fpm/etc/otel/collector/splunk-otel-collector.conf.example +++ b/packaging/fpm/etc/otel/collector/splunk-otel-collector.conf.example @@ -35,9 +35,6 @@ SPLUNK_API_URL=https://api.us0.signalfx.com # Splunk ingest endpoint URL. SPLUNK_INGEST_URL=https://ingest.us0.signalfx.com -# Splunk trace endpoint URL. -SPLUNK_TRACE_URL=https://ingest.us0.signalfx.com/v2/trace - # Splunk HEC endpoint URL, if forwarding to Splunk Observability Cloud SPLUNK_HEC_URL=https://ingest.us0.signalfx.com/v1/log # If you're forwarding to a Splunk Enterprise instance running on example.com, with HEC at port 8088: diff --git a/packaging/installer/install.ps1 b/packaging/installer/install.ps1 index 477add1c4a..e49e4db351 100644 --- a/packaging/installer/install.ps1 +++ b/packaging/installer/install.ps1 @@ -52,10 +52,6 @@ (OPTIONAL) Set the base API URL explicitly instead of the URL inferred from the specified realm (default: https://api.REALM.signalfx.com). .EXAMPLE .\install.ps1 -access_token "ACCESSTOKEN" -api_url "https://api.us1.signalfx.com" -.PARAMETER trace_url - (OPTIONAL) Set the trace endpoint URL explicitly instead of the endpoint inferred from the specified realm (default: https://ingest.REALM.signalfx.com/v2/trace). - .EXAMPLE - .\install.ps1 -access_token "ACCESSTOKEN" -trace_url "https://ingest.us1.signalfx.com/v2/trace" .PARAMETER hec_url (OPTIONAL) Set the HEC endpoint URL explicitly instead of the endpoint inferred from the specified realm (default: https://ingest.REALM.signalfx.com/v1/log). .EXAMPLE @@ -138,7 +134,6 @@ param ( [string]$network_interface = "", [string]$ingest_url = "", [string]$api_url = "", - [string]$trace_url = "", [string]$hec_url = "", [string]$hec_token = "", [bool]$insecure = $false, @@ -479,10 +474,6 @@ if ($api_url -eq "") { $api_url = "https://api.$realm.signalfx.com" } -if ($trace_url -eq "") { - $trace_url = "$ingest_url/v2/trace" -} - if ($hec_url -eq "") { $hec_url = "$ingest_url/v1/log" } @@ -579,7 +570,6 @@ $collector_env_vars = @{ "SPLUNK_INGEST_URL" = "$ingest_url"; "SPLUNK_MEMORY_TOTAL_MIB" = "$memory"; "SPLUNK_REALM" = "$realm"; - "SPLUNK_TRACE_URL" = "$trace_url"; } if ($network_interface -Ne "") { diff --git a/packaging/installer/install.sh b/packaging/installer/install.sh index 6d65cb0761..90febf7eaf 100755 --- a/packaging/installer/install.sh +++ b/packaging/installer/install.sh @@ -941,9 +941,6 @@ Collector: Specify this option to skip this step and use a pre-configured repo on the target system that provides the 'splunk-otel-collector' deb/rpm package. --test Use the test package repo instead of the primary. - --trace-url Set the trace endpoint URL explicitly instead of the endpoint inferred from the - specified realm. - (default: https://ingest.REALM.signalfx.com/v2/trace) Fluentd: --with[out]-fluentd Whether to install and configure fluentd to forward log events to the collector. @@ -1245,7 +1242,6 @@ parse_args_and_install() { local stage="$default_stage" local service_user="$default_service_user" local td_agent_version="$default_td_agent_version" - local trace_url= local uninstall="false" local mode="agent" local with_fluentd="false" @@ -1339,10 +1335,6 @@ parse_args_and_install() { --test) stage="test" ;; - --trace-url) - trace_url="$2" - shift 1 - ;; --uninstall) uninstall="true" ;; @@ -1500,10 +1492,6 @@ parse_args_and_install() { td_agent_version="" fi - if [ -z "$trace_url" ]; then - trace_url="${ingest_url}/v2/trace" - fi - check_support # check auto instrumentation options @@ -1585,7 +1573,6 @@ parse_args_and_install() { echo "Realm: $realm" echo "Ingest Endpoint: $ingest_url" echo "API Endpoint: $api_url" - echo "Trace Endpoint: $trace_url" echo "HEC Endpoint: $hec_url" if [ -n "$td_agent_version" ]; then echo "TD Agent (Fluentd) Version: $td_agent_version" @@ -1727,7 +1714,6 @@ parse_args_and_install() { configure_env_file "SPLUNK_REALM" "$realm" "$collector_env_path" configure_env_file "SPLUNK_API_URL" "$api_url" "$collector_env_path" configure_env_file "SPLUNK_INGEST_URL" "$ingest_url" "$collector_env_path" - configure_env_file "SPLUNK_TRACE_URL" "$trace_url" "$collector_env_path" configure_env_file "SPLUNK_HEC_URL" "$hec_url" "$collector_env_path" configure_env_file "SPLUNK_HEC_TOKEN" "$hec_token" "$collector_env_path" configure_env_file "SPLUNK_MEMORY_TOTAL_MIB" "$memory" "$collector_env_path" diff --git a/packaging/msi/make.ps1 b/packaging/msi/make.ps1 index 8113f96d21..a41defad60 100644 --- a/packaging/msi/make.ps1 +++ b/packaging/msi/make.ps1 @@ -83,7 +83,6 @@ function Confirm-MSI { ((Get-Content -path "$configpath" -Raw) -Replace '\${SPLUNK_HEC_URL}', 'https://ingest.us0.signalfx.com/v1/log') | Set-Content -Path "$configpath" ((Get-Content -path "$configpath" -Raw) -Replace '\${SPLUNK_HEC_TOKEN}', 'testing456') | Set-Content -Path "$configpath" ((Get-Content -path "$configpath" -Raw) -Replace '\${SPLUNK_INGEST_URL}', 'https://ingest.us0.signalfx.com') | Set-Content -Path "$configpath" - ((Get-Content -path "$configpath" -Raw) -Replace '\${SPLUNK_TRACE_URL}', 'https://ingest.us0.signalfx.com/v2/trace') | Set-Content -Path "$configpath" ((Get-Content -path "$configpath" -Raw) -Replace '\${SPLUNK_BUNDLE_DIR}', 'C:\Program Files\Splunk\OpenTelemetry Collector\agent-bundle') | Set-Content -Path "$configpath" # start service diff --git a/packaging/msi/splunk-otel-collector.wxs b/packaging/msi/splunk-otel-collector.wxs index badbe9158d..c22af40c6f 100644 --- a/packaging/msi/splunk-otel-collector.wxs +++ b/packaging/msi/splunk-otel-collector.wxs @@ -39,14 +39,12 @@ - - @@ -57,7 +55,6 @@ NOT SPLUNK_INGEST_URL NOT SPLUNK_HEC_URL - NOT SPLUNK_TRACE_URL NOT SPLUNK_BUNDLE_DIR @@ -115,7 +112,6 @@ SPLUNK_HEC_URL=[SPLUNK_HEC_URL] SPLUNK_INGEST_URL=[SPLUNK_INGEST_URL] SPLUNK_REALM=[SPLUNK_REALM] - SPLUNK_TRACE_URL=[SPLUNK_TRACE_URL] diff --git a/packaging/technical-addon/Splunk_TA_otel/README/inputs.conf.spec b/packaging/technical-addon/Splunk_TA_otel/README/inputs.conf.spec index 7fcf63a0c5..f3ceec83e0 100644 --- a/packaging/technical-addon/Splunk_TA_otel/README/inputs.conf.spec +++ b/packaging/technical-addon/Splunk_TA_otel/README/inputs.conf.spec @@ -45,9 +45,6 @@ splunk_memory_limit_mib = splunk_memory_total_mib = * Value to use for the `SPLUNK_MEMORY_TOTAL_MIB` environment variable -splunk_trace_url = -* Endpoint for `SPLUNK_TRACE_URL` - splunk_ingest_url = * Endpoint for `SPLUNK_API_URL` diff --git a/packaging/technical-addon/Splunk_TA_otel/configs/ta-agent-config.yaml b/packaging/technical-addon/Splunk_TA_otel/configs/ta-agent-config.yaml index 010a163601..6b0e4c0315 100644 --- a/packaging/technical-addon/Splunk_TA_otel/configs/ta-agent-config.yaml +++ b/packaging/technical-addon/Splunk_TA_otel/configs/ta-agent-config.yaml @@ -8,7 +8,6 @@ # - SPLUNK_COLLECTD_DIR: The path to the collectd config directory for the Smart Agent, e.g. /usr/lib/splunk-otel-collector/agent-bundle/run/collectd # - SPLUNK_INGEST_URL: The Splunk ingest URL, e.g. https://ingest.us0.signalfx.com # - SPLUNK_LISTEN_INTERFACE: The network interface the agent receivers listen on. -# - SPLUNK_TRACE_URL: The Splunk trace endpoint URL, e.g. https://ingest.us0.signalfx.com/v2/trace extensions: health_check: @@ -124,7 +123,7 @@ exporters: # Traces sapm: access_token: "${env:SPLUNK_ACCESS_TOKEN}" - endpoint: "${env:SPLUNK_TRACE_URL}" + endpoint: "${env:SPLUNK_INGEST_URL}/v2/trace" # Metrics + Events signalfx: access_token: "${env:SPLUNK_ACCESS_TOKEN}" diff --git a/packaging/technical-addon/Splunk_TA_otel/configs/ta-agent-to-gateway-config.yaml b/packaging/technical-addon/Splunk_TA_otel/configs/ta-agent-to-gateway-config.yaml index 3871954a14..6315d32dad 100644 --- a/packaging/technical-addon/Splunk_TA_otel/configs/ta-agent-to-gateway-config.yaml +++ b/packaging/technical-addon/Splunk_TA_otel/configs/ta-agent-to-gateway-config.yaml @@ -11,7 +11,6 @@ # - SPLUNK_HEC_URL: The Splunk HEC endpoint URL, e.g. https://ingest.us0.signalfx.com/v1/log # - SPLUNK_INGEST_URL: The Splunk ingest URL, e.g. https://ingest.us0.signalfx.com # - SPLUNK_LISTEN_INTERFACE: The network interface the agent receivers listen on. -# - SPLUNK_TRACE_URL: The Splunk trace endpoint URL, e.g. https://ingest.us0.signalfx.com:443 extensions: health_check: diff --git a/packaging/technical-addon/Splunk_TA_otel/default/inputs.conf b/packaging/technical-addon/Splunk_TA_otel/default/inputs.conf index 8f0410db35..fb40fc3984 100644 --- a/packaging/technical-addon/Splunk_TA_otel/default/inputs.conf +++ b/packaging/technical-addon/Splunk_TA_otel/default/inputs.conf @@ -19,7 +19,6 @@ splunk_api_url=https://api.us0.signalfx.com splunk_bundle_dir=$SPLUNK_OTEL_TA_PLATFORM_HOME/bin/agent-bundle splunk_collectd_dir=$SPLUNK_OTEL_TA_PLATFORM_HOME/bin/agent-bundle/run/collectd splunk_ingest_url=https://ingest.us0.signalfx.com -splunk_trace_url=https://ingest.us0.signalfx.com/v2/trace splunk_listen_interface=localhost splunk_realm=us0 splunk_config=$SPLUNK_OTEL_TA_HOME/configs/ta-agent-config.yaml diff --git a/packaging/technical-addon/Splunk_TA_otel/linux_x86_64/bin/Splunk_TA_otel.sh b/packaging/technical-addon/Splunk_TA_otel/linux_x86_64/bin/Splunk_TA_otel.sh index a927011098..91575c9db3 100755 --- a/packaging/technical-addon/Splunk_TA_otel/linux_x86_64/bin/Splunk_TA_otel.sh +++ b/packaging/technical-addon/Splunk_TA_otel/linux_x86_64/bin/Splunk_TA_otel.sh @@ -45,8 +45,6 @@ splunk_memory_limit_mib_name="splunk_memory_limit_mib" splunk_memory_limit_mib_value="" splunk_memory_total_mib_name="splunk_memory_total_mib" splunk_memory_total_mib_value="" -splunk_trace_url_name="splunk_trace_url" -splunk_trace_url_value="" splunk_otel_log_file_name="splunk_otel_log_file" splunk_otel_log_file_value="" splunk_ingest_url_name="splunk_ingest_url" @@ -205,13 +203,6 @@ splunk_TA_otel_read_configs() { splunk_TA_otel_log_msg "DEBUG" "Set $splunk_memory_total_mib_name to $splunk_memory_total_mib_value" fi - has_splunk_trace_url="$(echo "$line" | grep "$splunk_trace_url_name")" - if [ "$has_splunk_trace_url" ] ; then - splunk_TA_otel_log_msg "DEBUG" "reading $splunk_trace_url_name from line $has_splunk_trace_url" - splunk_trace_url_value="$(echo "$has_splunk_trace_url" | grep -Eo ">(.*?)<" | sed 's/^>\(.*\)<$/\1/')" - splunk_TA_otel_log_msg "INFO" "Set $splunk_trace_url_name to $splunk_trace_url_value" - fi - has_splunk_otel_log_file_name="$(echo "$line" | grep "$splunk_otel_log_file_name")" if [ "$has_splunk_otel_log_file_name" ] ; then splunk_TA_otel_log_msg "DEBUG" "reading $splunk_otel_log_file_name from line $has_splunk_otel_log_file_name" @@ -364,11 +355,6 @@ splunk_TA_otel_run_agent() { else splunk_TA_otel_log_msg "DEBUG" "NOT SET: $splunk_memory_total_mib_name" fi - if [ "$splunk_trace_url_value" ] ; then - export SPLUNK_TRACE_URL="$splunk_trace_url_value" - else - splunk_TA_otel_log_msg "INFO" "NOT SET: $splunk_trace_url_name" - fi if [ "$splunk_otel_log_file_value" ] ; then export SPLUNK_OTEL_LOG_FILE_NAME="$splunk_otel_log_file_value" else diff --git a/packaging/technical-addon/Splunk_TA_otel/windows_x86_64/bin/Splunk_TA_otel.cmd b/packaging/technical-addon/Splunk_TA_otel/windows_x86_64/bin/Splunk_TA_otel.cmd index 5632bfb28a..da8c7565bb 100644 --- a/packaging/technical-addon/Splunk_TA_otel/windows_x86_64/bin/Splunk_TA_otel.cmd +++ b/packaging/technical-addon/Splunk_TA_otel/windows_x86_64/bin/Splunk_TA_otel.cmd @@ -35,8 +35,6 @@ set "splunk_memory_limit_mib_name=splunk_memory_limit_mib" set "splunk_memory_limit_mib_value=" set "splunk_memory_total_mib_name=splunk_memory_total_mib" set "splunk_memory_total_mib_value=" -set "splunk_trace_url_name=splunk_trace_url" -set "splunk_trace_url_value=" set "splunk_otel_log_file_name=splunk_otel_log_file" set "splunk_otel_log_file_value=" set "splunk_ingest_url_name=splunk_ingest_url" @@ -158,11 +156,6 @@ if "%splunk_memory_total_mib_value%" == "" ( ) else ( set "SPLUNK_MEMORY_TOTAL_MIB=%splunk_memory_total_mib_value%" ) -if "%splunk_trace_url_value%" == "" ( - call :splunk_TA_otel_log_msg "DEBUG" "Param %splunk_trace_url_name% not set" -) else ( - set "SPLUNK_TRACE_URL=%splunk_trace_url_value%" -) if "%splunk_otel_log_file_value%" == "" ( call :splunk_TA_otel_log_msg "DEBUG" "Param %splunk_otel_log_file_name% not set" ) else ( @@ -219,7 +212,7 @@ exit /B 0 :splunk_TA_otel_read_configs echo "INFO grabbing config from stdin..." -for /F "tokens=1,2 delims==" %%I in ('powershell -noninteractive -noprofile -command "$input | Select-String -Pattern '.*?(%gomemlimit_name%|%splunk_api_url_name%|%splunk_bundle_dir_name%|%splunk_config_name%|%splunk_config_dir_name%|%splunk_collectd_dir_name%|%splunk_debug_config_server_name%|%splunk_config_yaml_name%|%splunk_gateway_url_name%|%splunk_hec_url_name%|%splunk_listen_interface_name%|%splunk_memory_limit_mib_name%|%splunk_memory_total_mib_name%|%splunk_trace_url_name%|%splunk_otel_log_file_name%|%splunk_ingest_url_name%|%splunk_realm_name%|%splunk_access_token_file_name%|session_key).*?>(.*?)<' | ForEach-Object { $_.Matches.Groups[1].Value + '=' + $_.Matches.Groups[2].Value }"') do ( +for /F "tokens=1,2 delims==" %%I in ('powershell -noninteractive -noprofile -command "$input | Select-String -Pattern '.*?(%gomemlimit_name%|%splunk_api_url_name%|%splunk_bundle_dir_name%|%splunk_config_name%|%splunk_config_dir_name%|%splunk_collectd_dir_name%|%splunk_debug_config_server_name%|%splunk_config_yaml_name%|%splunk_gateway_url_name%|%splunk_hec_url_name%|%splunk_listen_interface_name%|%splunk_memory_limit_mib_name%|%splunk_memory_total_mib_name%|%splunk_otel_log_file_name%|%splunk_ingest_url_name%|%splunk_realm_name%|%splunk_access_token_file_name%|session_key).*?>(.*?)<' | ForEach-Object { $_.Matches.Groups[1].Value + '=' + $_.Matches.Groups[2].Value }"') do ( if "%%I"=="%gomemlimit_name%" set "gomemlimit_value=%%J" if "%%I"=="%splunk_api_url_name%" set "splunk_api_url_value=%%J" if "%%I"=="%splunk_bundle_dir_name%" set "splunk_bundle_dir_value=%%J" @@ -233,7 +226,6 @@ for /F "tokens=1,2 delims==" %%I in ('powershell -noninteractive -noprofile -com if "%%I"=="%splunk_listen_interface_name%" set "splunk_listen_interface_value=%%J" if "%%I"=="%splunk_memory_limit_mib_name%" set "splunk_memory_limit_mib_value=%%J" if "%%I"=="%splunk_memory_total_mib_name%" set "splunk_memory_total_mib_value=%%J" - if "%%I"=="%splunk_trace_url_name%" set "splunk_trace_url_value=%%J" if "%%I"=="%splunk_otel_log_file_name%" set "splunk_otel_log_file_value=%%J" if "%%I"=="%splunk_ingest_url_name%" set "splunk_ingest_url_value=%%J" if "%%I"=="%splunk_realm_name%" set "splunk_realm_value=%%J" diff --git a/packaging/technical-addon/packaging-scripts/cicd-tests/mysql/ta-agent-config.yaml b/packaging/technical-addon/packaging-scripts/cicd-tests/mysql/ta-agent-config.yaml index 0f9ed173be..587f8b9df5 100644 --- a/packaging/technical-addon/packaging-scripts/cicd-tests/mysql/ta-agent-config.yaml +++ b/packaging/technical-addon/packaging-scripts/cicd-tests/mysql/ta-agent-config.yaml @@ -8,7 +8,6 @@ # - SPLUNK_COLLECTD_DIR: The path to the collectd config directory for the Smart Agent, e.g. /usr/lib/splunk-otel-collector/agent-bundle/run/collectd # - SPLUNK_INGEST_URL: The Splunk ingest URL, e.g. https://ingest.us0.signalfx.com # - SPLUNK_LISTEN_INTERFACE: The network interface the agent receivers listen on. -# - SPLUNK_TRACE_URL: The Splunk trace endpoint URL, e.g. https://ingest.us0.signalfx.com/v2/trace extensions: health_check: @@ -135,7 +134,7 @@ exporters: # Traces sapm: access_token: "${env:SPLUNK_ACCESS_TOKEN}" - endpoint: "${env:SPLUNK_TRACE_URL}" + endpoint: "${env:SPLUNK_INGEST_URL}/v2/trace" # Metrics + Events signalfx: access_token: "${env:SPLUNK_ACCESS_TOKEN}" diff --git a/packaging/tests/deployments/puppet/puppet_test.py b/packaging/tests/deployments/puppet/puppet_test.py index d1a3060ff5..f144050f05 100644 --- a/packaging/tests/deployments/puppet/puppet_test.py +++ b/packaging/tests/deployments/puppet/puppet_test.py @@ -122,7 +122,6 @@ def verify_env_file(container, api_url=SPLUNK_API_URL, ingest_url=SPLUNK_INGEST_ verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_HEC_URL", f"{ingest_url}/v1/log") verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_INGEST_URL", ingest_url) verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_REALM", SPLUNK_REALM) - verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_TRACE_URL", f"{ingest_url}/v2/trace") def skip_if_necessary(distro, puppet_release): @@ -500,7 +499,6 @@ class {{ splunk_otel_collector: assert get_registry_value("SPLUNK_API_URL") == SPLUNK_API_URL assert get_registry_value("SPLUNK_INGEST_URL") == SPLUNK_INGEST_URL assert get_registry_value("SPLUNK_HEC_URL") == f"{SPLUNK_INGEST_URL}/v1/log" - assert get_registry_value("SPLUNK_TRACE_URL") == f"{SPLUNK_INGEST_URL}/v2/trace" assert get_registry_value("SPLUNK_HEC_TOKEN") == SPLUNK_ACCESS_TOKEN try: listen_interface = get_registry_value("SPLUNK_LISTEN_INTERFACE") @@ -530,7 +528,6 @@ def test_win_puppet_custom_vars(): assert get_registry_value("SPLUNK_INGEST_URL") == ingest_url assert get_registry_value("SPLUNK_HEC_URL") == f"{ingest_url}/v1/log" assert get_registry_value("SPLUNK_LISTEN_INTERFACE") == "0.0.0.0" - assert get_registry_value("SPLUNK_TRACE_URL") == f"{ingest_url}/v2/trace" assert get_registry_value("SPLUNK_HEC_TOKEN") == "fake-hec-token" assert get_registry_value("MY_CUSTOM_VAR1") == "value1" assert get_registry_value("MY_CUSTOM_VAR2") == "value2" diff --git a/packaging/tests/deployments/salt/salt_test.py b/packaging/tests/deployments/salt/salt_test.py index 3e89839f58..4855b8a735 100644 --- a/packaging/tests/deployments/salt/salt_test.py +++ b/packaging/tests/deployments/salt/salt_test.py @@ -132,7 +132,6 @@ def verify_env_file(container, api_url=SPLUNK_API_URL, ingest_url=SPLUNK_INGEST_ verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_REALM", SPLUNK_REALM) verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_API_URL", api_url) verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_INGEST_URL", ingest_url) - verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_TRACE_URL", f"{ingest_url}/v2/trace") verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_HEC_URL", f"{ingest_url}/v1/log") verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_HEC_TOKEN", hec_token) verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_MEMORY_TOTAL_MIB", SPLUNK_MEMORY_TOTAL_MIB) diff --git a/packaging/tests/installer_test.py b/packaging/tests/installer_test.py index 266345fe91..52934dc31d 100644 --- a/packaging/tests/installer_test.py +++ b/packaging/tests/installer_test.py @@ -153,7 +153,6 @@ def verify_env_file(container, mode="agent", config_path=None, memory=TOTAL_MEMO verify_config_file(container, env_path, "SPLUNK_REALM", SPLUNK_REALM) verify_config_file(container, env_path, "SPLUNK_API_URL", api_url) verify_config_file(container, env_path, "SPLUNK_INGEST_URL", ingest_url) - verify_config_file(container, env_path, "SPLUNK_TRACE_URL", f"{ingest_url}/v2/trace") verify_config_file(container, env_path, "SPLUNK_HEC_URL", f"{ingest_url}/v1/log") verify_config_file(container, env_path, "SPLUNK_HEC_TOKEN", SPLUNK_ACCESS_TOKEN) verify_config_file(container, env_path, "SPLUNK_MEMORY_TOTAL_MIB", memory) diff --git a/tests/msi/msi_test.go b/tests/msi/msi_test.go index 1be429854c..d617c97e2e 100644 --- a/tests/msi/msi_test.go +++ b/tests/msi/msi_test.go @@ -232,7 +232,6 @@ func assertServiceConfiguration(t *testing.T, msiProperties map[string]string) { "SPLUNK_REALM": installRealm, "SPLUNK_API_URL": optionalInstallPropertyOrDefault(msiProperties, "SPLUNK_API_URL", "https://api."+installRealm+".signalfx.com"), "SPLUNK_INGEST_URL": ingestURL, - "SPLUNK_TRACE_URL": ingestURL + "/v2/trace", "SPLUNK_HEC_URL": ingestURL + "/v1/log", "SPLUNK_HEC_TOKEN": optionalInstallPropertyOrDefault(msiProperties, "SPLUNK_HEC_TOKEN", msiProperties["SPLUNK_ACCESS_TOKEN"]), "SPLUNK_BUNDLE_DIR": filepath.Join(programFilesDir, "Splunk", "OpenTelemetry Collector", "agent-bundle"), diff --git a/tests/zeroconfig/windows/testdata/Dockerfile.iis.server b/tests/zeroconfig/windows/testdata/Dockerfile.iis.server index dc6526deb5..c9e189a2a3 100644 --- a/tests/zeroconfig/windows/testdata/Dockerfile.iis.server +++ b/tests/zeroconfig/windows/testdata/Dockerfile.iis.server @@ -24,7 +24,7 @@ ENV ACCESS_TOKEN_TMP=$access_token RUN ` $token = $Env:ACCESS_TOKEN_TMP; ` $collector_msi_path = (dir "c:\setup\splunk-otel-collector-*.msi").FullName; ` - c:\setup\install.ps1 -access_token $token -msi_path $collector_msi_path -with_dotnet_instrumentation $true -deployment_env zc-iis-test -ingest_url "http://splunk-otel-collector:9943" -trace_url "http://splunk-otel-collector:7276/v2/trace" -network_interface "0.0.0.0" + c:\setup\install.ps1 -access_token $token -msi_path $collector_msi_path -with_dotnet_instrumentation $true -deployment_env zc-iis-test -ingest_url "http://splunk-otel-collector:9943" -network_interface "0.0.0.0" ENV ACCESS_TOKEN_TMP= COPY apps/bin/aspnetfxapp/_PublishedWebsites/AspNet.WebApi.NetFramework/ /apps/aspnetfx diff --git a/tests/zeroconfig/windows/testdata/Dockerfile.pipeline.collector b/tests/zeroconfig/windows/testdata/Dockerfile.pipeline.collector index 404da61ca9..fc845c48eb 100644 --- a/tests/zeroconfig/windows/testdata/Dockerfile.pipeline.collector +++ b/tests/zeroconfig/windows/testdata/Dockerfile.pipeline.collector @@ -18,7 +18,7 @@ ENV ACCESS_TOKEN_TMP=$access_token RUN ` $token = $Env:ACCESS_TOKEN_TMP; ` $collector_msi_path = (dir "c:\setup\splunk-otel-collector-*.msi").FullName; ` - c:\setup\install.ps1 -access_token $token -msi_path $collector_msi_path -config_path "C:\setup\pipeline-collector.yaml" -with_fluentd $false -ingest_url "http://192.0.2.1:12345" -trace_url "http://192.0.2.1:12345" -network_interface "0.0.0.0" + c:\setup\install.ps1 -access_token $token -msi_path $collector_msi_path -config_path "C:\setup\pipeline-collector.yaml" -with_fluentd $false -ingest_url "http://192.0.2.1:12345" -network_interface "0.0.0.0" ENV ACCESS_TOKEN_TMP= # On docker compose the entry point needs to be changed to something that keeps the container alive.