Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate SPLUNK_TRACE_URL env var and don't use it in default configs #5672

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/scripts/win-test-services.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions cmd/otelcol/config/collector/agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}"
Expand Down
3 changes: 1 addition & 2 deletions cmd/otelcol/config/collector/upstream_agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}"
Expand Down
3 changes: 1 addition & 2 deletions cmd/otelcol/fips/config/agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}"
Expand Down
7 changes: 0 additions & 7 deletions deployments/ansible/molecule/custom_vars/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 0 additions & 7 deletions deployments/ansible/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion deployments/ansible/molecule/default/windows-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
5 changes: 0 additions & 5 deletions deployments/ansible/roles/collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion deployments/ansible/roles/collector/tasks/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
1 change: 0 additions & 1 deletion deployments/chef/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion deployments/chef/recipes/collector_win_config_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
3 changes: 0 additions & 3 deletions deployments/chef/templates/splunk-otel-collector.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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'] %>

Expand Down
3 changes: 0 additions & 3 deletions deployments/chef/test/integration/custom_vars/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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' },
]
Expand Down Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions deployments/chef/test/integration/default/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -27,7 +26,7 @@
{ 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 },
{ name: 'SPLUNK_TRACE_URL', type: :string, data: "#{splunk_ingest_url}/v2/trace" },
]

collector_env_vars_strings = []
Expand Down Expand Up @@ -57,7 +56,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
Expand Down
1 change: 0 additions & 1 deletion deployments/puppet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`<br>Windows: `%PROGRAMFILES%\Splunk\OpenTelemetry Collector\agent-bundle` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion deployments/puppet/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
Expand Down
3 changes: 0 additions & 3 deletions deployments/salt/splunk-otel-collector/collector_config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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) %}
Expand All @@ -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 }}
Expand Down
Loading
Loading