Skip to content
2 changes: 2 additions & 0 deletions deployments/chef/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## chef-v0.17.0

- Bug fix: Fix bug that caused custom variables to not be set when running on Windows
with a Splunk OTel Collector version >= `0.98.0`.
- Remove the option `with_signalfx_dotnet_auto_instrumentation` used to
install the deprecated `SignalFx Auto Instrumentation for .NET` on Windows.

Expand Down
2 changes: 1 addition & 1 deletion deployments/chef/kitchen.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ suites:
splunk_memory_total_mib: "256"
splunk_hec_token: fake-hec-token
splunk_listen_interface: "0.0.0.0"
collector_version: 0.48.0
collector_version: 0.126.0
collector_additional_env_vars:
MY_CUSTOM_VAR1: value1
MY_CUSTOM_VAR2: value2
Expand Down
2 changes: 1 addition & 1 deletion deployments/chef/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Install/Configure the Splunk OpenTelemetry Collector'
version '0.16.0'
version '0.17.0'
chef_version '>= 16.0'

supports 'amazon'
Expand Down
3 changes: 2 additions & 1 deletion deployments/chef/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

# Older MSI versions can't properly setup the collector configuration
# in this case, we need to use the registry to set the environment variables.
unless node['splunk_otel_collector']['collector_msi_is_configurable']
# Custom variables also require using the registry, as the MSI doesn't support it.
if !node['splunk_otel_collector']['collector_msi_is_configurable'] || !node['splunk_otel_collector']['collector_additional_env_vars'].empty?
include_recipe 'splunk_otel_collector::collector_win_registry'
end

Expand Down
1 change: 1 addition & 0 deletions deployments/chef/test/integration/custom_vars/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
end
collector_env_vars_strings.sort!
describe registry_key('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\splunk-otel-collector') do
it { should have_property 'Environment' }
it { should have_property_value('Environment', :multi_string, collector_env_vars_strings) }
end
describe service('fluentdwinsvc') do
Expand Down
Loading