Skip to content

Commit

Permalink
Merge branch 'main' into sapm_to_otlphttp
Browse files Browse the repository at this point in the history
  • Loading branch information
asreehari-splunk committed Dec 10, 2024
2 parents 798407a + c5aed62 commit f5fcd0f
Show file tree
Hide file tree
Showing 83 changed files with 1,490 additions and 1,415 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/chef-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
uses: actions/checkout@v4

- name: Install chef
uses: actionshub/[email protected].0
uses: actionshub/[email protected].1
with:
version: ${{ env.CHEF_VERSION }}

Expand All @@ -114,7 +114,7 @@ jobs:
uses: actions/checkout@v4

- name: Install chef
uses: actionshub/[email protected].0
uses: actionshub/[email protected].1
with:
version: ${{ env.CHEF_VERSION }}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lychee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
id: lychee
uses: lycheeverse/[email protected]
with:
lycheeVersion: nightly # TODO: Change to stable once v0.17.1 is released, the version that includes a retry fix
args: -v -n --config .lychee.toml './*.md' './**/*.md'
fail: true
env:
Expand Down
9 changes: 4 additions & 5 deletions .lychee.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
max-concurrency = 20
accept = [
200,
429,
]
max_concurrency = 20
timeout = 30
max_retires = 5
retry_wait_time = 30
exclude = [
"my.host",
"file://*",
Expand All @@ -24,4 +22,5 @@ exclude = [
"https://self-service.isv.ci", # Failing with timeouts, not stable and still current according to https://github.com/cf-platform-eng/selfservice/blame/main/README.md#L3
"https://github.com/signalfx/splunk-otel-collector/tree/main/internal/exporter/httpsinkexporter", # exporter was deleted
"https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/loggingexporter", # exporter was deleted
"https://github.com/.*/(pull|issues)/[0-9]+", # We have too many PR and issues links in CHANGELOG.md that we allways run out of the rate limit
]
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,45 @@

## Unreleased

## v0.114.0

### 💡 Enhancements 💡

- (Contrib) `processor/k8sattributes`: Add support for profiles signal ([#35983](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/35983))
- (Contrib) `receiver/k8scluster`: Add support for limiting observed resources to a specific namespace. ([#9401](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/9401))
This change allows to make use of this receiver with `Roles`/`RoleBindings`, as opposed to giving the collector cluster-wide read access.
- (Contrib) `processor/resourcedetection`: Introduce support for Profiles signal type. ([#35980](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/35980))
- (Contrib) `connector/routing`: Add ability to route by metric context ([#36236](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36236))
- (Contrib) `connector/routing`: Add ability to route by span context ([#36276](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36276))
- (Contrib) `processor/spanprocessor`: Add a new configuration option to keep the original span name when extracting attributes from the span name. ([#36120](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36120))
- (Contrib) `receiver/splunkenterprise`: Add new metrics for Splunk Enterprise dispatch artifacts caches ([#36181](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36181))

### 🚩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.
This fixes journald receiver on kubernetes nodes with recent versions of systemd ([#5664](https://github.com/signalfx/splunk-otel-collector/pull/5664)).
This fixes journald receiver on kubernetes nodes with recent versions of systemd ([#5664](https://github.com/signalfx/splunk-otel-collector/pull/5664)).
- (Core) scraperhelper: If the scraper shuts down, do not scrape first. ([#11632](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/11632))
When the scraper is shutting down, it currently will scrape at least once. With this change, upon receiving a shutdown order, the receiver's scraperhelper will exit immediately.
- (Contrib) `pkg/stanza`: Ensure that time parsing happens before entry is sent to downstream operators ([#36213](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36213))
- (Contrib) `processor/k8sattributes`: Block when starting until the metadata have been synced, to fix that some data couldn't be associated with metadata when the agent was just started. ([#32556](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32556))
- (Contrib) `exporter/loadbalancing`: Shutdown exporters during collector shutdown. This fixes a memory leak. ([#36024](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36024))
- (Contrib) `pkg/ottl`: Respect the `depth` option when flattening slices using `flatten` ([#36161](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36161))
The `depth` option is also now required to be at least `1`.
- (Contrib) `pkg/stanza`: Synchronous handling of entries passed from the log emitter to the receiver adapter ([#35453](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/35453))
- (Contrib) `receiver/prometheus`: Fix prometheus receiver to support static scrape config with Target Allocator ([#36062](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36062))

## v0.113.0

Expand Down
24 changes: 17 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include ./packaging/technical-addon/Makefile

### VARIABLES


# BUILD_TYPE should be one of (dev, release).
BUILD_TYPE?=release
VERSION?=latest
Expand All @@ -15,8 +14,8 @@ GOOS=$(shell go env GOOS)

FIND_MOD_ARGS=-type f -name "go.mod"
TO_MOD_DIR=dirname {} \; | sort | egrep '^./'
# NONROOT_MODS includes ./* dirs (excludes . dir)
NONROOT_MODS := $(shell find . $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR) )

ALL_MODS := $(shell find . $(FIND_MOD_ARGS) -exec $(TO_MOD_DIR)) $(PWD)

GOTEST=go test -p $(NUM_CORES)

Expand Down Expand Up @@ -56,19 +55,30 @@ GOTESPLIT_INDEX?=0

.DEFAULT_GOAL := all

all-modules:
@echo $(ALL_MODS) | tr ' ' '\n' | sort

.PHONY: all
all: checklicense impi lint misspell test otelcol

.PHONY: for-all
for-all:
@echo "running $${CMD} in root"
@$${CMD}
@set -e; for dir in $(NONROOT_MODS); do \
@set -e; for dir in $(ALL_MODS); do \
(cd "$${dir}" && \
echo "running $${CMD} in $${dir}" && \
$${CMD} ); \
done

# Define a delegation target for each module
.PHONY: $(ALL_MODS)
$(ALL_MODS):
@echo "Running target '$(TARGET)' in module '$@'"
$(MAKE) --no-print-directory -C $@ $(TARGET)

# Triggers each module's delegation target
.PHONY: for-all-target
for-all-target: $(ALL_MODS)

.PHONY: integration-vet
integration-vet:
@set -e; cd tests && go vet -tags integration,testutilsintegration,zeroconfig,testutils ./... && $(GOTEST_SERIAL) $(BUILD_INFO_TESTS) -tags testutils,testutilsintegration -v -timeout 5m -count 1 ./...
Expand Down Expand Up @@ -111,7 +121,7 @@ gendependabot:

.PHONY: tidy-all
tidy-all:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="tidy"
$(MAKE) for-all-target TARGET="tidy"
$(MAKE) tidy

.PHONY: install-tools
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/otlp

extensions:
health_check:
Expand Down Expand Up @@ -128,7 +127,7 @@ processors:
exporters:
# Traces
otlphttp:
traces_endpoint: "${SPLUNK_TRACE_URL}"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Metrics + Events
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/otlp

extensions:
health_check:
Expand Down Expand Up @@ -122,7 +121,7 @@ processors:
exporters:
# Traces
otlphttp:
traces_endpoint: "${SPLUNK_TRACE_URL}"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Metrics + Events
Expand Down
2 changes: 0 additions & 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 @@ -118,7 +117,6 @@ processors:
exporters:
# Traces
otlphttp:
metrics_endpoint: "${SPLUNK_INGEST_URL}/v2/datapoint/otlp"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-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/otlp
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/otlp
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/otlp
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/otlp
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/otlp
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/otlp`. The `SPLUNK_TRACE_URL` environment
variable will be set with this value for the collector service. (**default:**
`{{ splunk_ingest_url }}/v2/trace/otlp`)

- `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/otlp"
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/otlp" }}
{% 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/otlp"
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/otlp"
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/otlp"
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
Loading

0 comments on commit f5fcd0f

Please sign in to comment.