Skip to content

Commit 2fa1993

Browse files
authored
[chef] Deprecate installing the SFx.NET instrumentation on Windows (#5865)
* [chef] Deprecate installing * Fix spacing
1 parent 9eb4afa commit 2fa1993

File tree

8 files changed

+16
-328
lines changed

8 files changed

+16
-328
lines changed

deployments/chef/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## chef-v0.17.0
4+
5+
- Remove the option `with_signalfx_dotnet_auto_instrumentation` used to
6+
install the deprecated
7+
[SignalFx Auto Instrumentation for .NET](
8+
https://docs.splunk.com/Observability/gdi/get-data-in/application/dotnet/get-started.html)
9+
on Windows.
10+
311
## chef-v0.16.0
412

513
- Add support for the `auto_instrumentation_logs_exporter` option to configure the `OTEL_LOGS_EXPORTER` environment variable.

deployments/chef/README.md

Lines changed: 8 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -299,136 +299,11 @@ after installation/configuration in order for any change to take effect.
299299
(**default:** `''`, i.e. defer to the default `OTEL_LOGS_EXPORTER` value for
300300
each activated SDK)
301301

302-
### Auto Instrumentation for .NET on Windows
303-
304-
***Warning:*** The `Environment` property in the
305-
`HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC` registry key will
306-
be overwritten by the options specified below to enable/configure auto
307-
instrumentation for IIS. Use the
308-
`signalfx_dotnet_auto_instrumentation_additional_options` option (see below for
309-
details) to include any other environment variables required for IIS.
310-
311-
**Note:** By default, IIS will be restarted with the `iisreset` command (if it
312-
exists) after installation/configuration. Applications ***not*** running within
313-
IIS need to be restarted/managed separately in order for any changes to take
314-
effect.
315-
316-
- `with_signalfx_dotnet_auto_instrumentation` (Windows only): Whether to
317-
install/manage [SignalFx Auto Instrumentation for .NET](
318-
https://docs.splunk.com/Observability/gdi/get-data-in/application/dotnet/get-started.html).
319-
When set to `true`, the `signalfx-dotnet-tracing` MSI package will be
320-
downloaded and installed, and the Windows registry will be updated based on
321-
the options below. (**default:** `false`)
322-
323-
- `signalfx_dotnet_auto_instrumentation_version` (Windows only): Version of the
324-
`signalfx-dotnet-tracing` MSI package to download and install from
325-
[GitHub Releases](https://github.com/signalfx/signalfx-dotnet-tracing/releases).
326-
(**default:** `1.1.0`)
327-
328-
- `signalfx_dotnet_auto_instrumentation_msi_url` (Windows only): Specify the
329-
URL to download the MSI from a custom host, for example
330-
`https://my.host/signalfx-dotnet-tracing-1.0.0-x64.msi`. If specified, the
331-
`signalfx_dotnet_auto_instrumentation_version` option is ignored.
332-
(**default:** `https://github.com/signalfx/signalfx-dotnet-tracing/releases/download/v{{ signalfx_dotnet_auto_instrumentation_version }}/signalfx-dotnet-tracing-{{ signalfx_dotnet_auto_instrumentation_version }}-x64.msi`)
333-
334-
- `signalfx_dotnet_auto_instrumentation_iisreset` (Windows only): By default,
335-
the `iisreset.exe` command (if it exists) will be executed after
336-
installation/configuration in order for any changes to take effect for IIS
337-
applications. Set this option to `false` to skip this step if IIS is managed
338-
separately or is not applicable. (**default:** `true`)
339-
340-
- `signalfx_dotnet_auto_instrumentation_system_wide` (Windows only): By
341-
default, the `Environment` property in the
342-
`HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC` registry key
343-
will be configured for the following environment variables and any from the
344-
`signalfx_dotnet_auto_instrumentation_additional_options` option to
345-
enable/configure auto instrumentation for ***only*** IIS applications:
346-
```yaml
347-
COR_ENABLE_PROFILING: true # Required
348-
COR_PROFILER: "{B4C89B0F-9908-4F73-9F59-0D77C5A06874}" # Required
349-
CORECLR_ENABLE_PROFILING: true # Required
350-
CORECLR_PROFILER: "{B4C89B0F-9908-4F73-9F59-0D77C5A06874}" # Required
351-
SIGNALFX_ENV: "{{ signalfx_dotnet_auto_instrumentation_environment }}"
352-
SIGNALFX_PROFILER_ENABLED: "{{ signalfx_dotnet_auto_instrumentation_enable_profiler }}"
353-
SIGNALFX_PROFILER_MEMORY_ENABLED: "{{ signalfx_dotnet_auto_instrumentation_enable_profiler_memory }}"
354-
SIGNALFX_SERVICE_NAME: "{{ signalfx_dotnet_auto_instrumentation_service_name }}"
355-
```
356-
Set this option to `true` to also add these environment variables and any
357-
from the `signalfx_dotnet_auto_instrumentation_additional_options` option to
358-
the
359-
`HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment`
360-
registry key to enable/configure auto instrumentation for ***all*** .NET
361-
applications on the node. (**default:** `false`)
362-
363-
- `signalfx_dotnet_auto_instrumentation_environment` (Windows only): Configure
364-
this option to set the "Environment" value to be reported to Splunk APM, for
365-
example `production`. The value is assigned to the `SIGNALFX_ENV` environment
366-
variable in the Windows registry (**default:** `''`, i.e. the "Environment"
367-
will appear as `unknown` in Splunk APM for the instrumented
368-
service/application)
369-
370-
- `signalfx_dotnet_auto_instrumentation_service_name` (Windows only): Configure
371-
this variable to override the [auto-generated service name](
372-
https://docs.splunk.com/Observability/gdi/get-data-in/application/dotnet/configuration/advanced-dotnet-configuration.html#changing-the-default-service-name)
373-
for the instrumented service/application, for example `my-service-name`. The
374-
value is assigned to the `SIGNALFX_SERVICE_NAME` environment variable in the
375-
Windows registry. (**default:** `''`)
376-
377-
- `signalfx_dotnet_auto_instrumentation_enable_profiler` (Windows only): Set
378-
this option to `true` to enable AlwaysOn Profiling. The value will be
379-
assigned to the `SIGNALFX_PROFILER_ENABLED` environment variable in the
380-
Windows registry. (**default:** `false`)
381-
382-
- `signalfx_dotnet_auto_instrumentation_enable_profiler_memory` (Windows only):
383-
Set this option to `true` to enable AlwaysOn Memory Profiling. The value will
384-
be assigned to the `SIGNALFX_PROFILER_MEMORY_ENABLED` environment variable in
385-
the Windows registry. (**default:** `false`)
386-
387-
- `signalfx_dotnet_auto_instrumentation_additional_options` (Windows only):
388-
Hash of additional options to be added to the Windows registry
389-
***in addition*** to the options above. (**default:** `{}`)
390-
391-
For example:
392-
```yaml
393-
signalfx_dotnet_auto_instrumentation_additional_options: {
394-
'SIGNALFX_VERSION': '1.2.3',
395-
'SIGNALFX_FILE_LOG_ENABLED': false,
396-
# Hint: If the signalfx_dotnet_auto_instrumentation_system_wide option is
397-
# set to true, all .NET applications on the node will be instrumented. Use
398-
# the following options to include/exclude processes from auto
399-
# instrumentation.
400-
'SIGNALFX_PROFILER_PROCESSES': 'MyApp.exe;dotnet.exe',
401-
'SIGNALFX_PROFILER_EXCLUDE_PROCESSES': 'ReservedProcess.exe;powershell.exe',
402-
}
403-
```
404-
Check the [Advanced Configuration Guide](
405-
https://docs.splunk.com/Observability/gdi/get-data-in/application/dotnet/configuration/advanced-dotnet-configuration.html)
406-
for more details about the options above and other supported options.
407-
408-
To uninstall the `signalfx-dotnet-tracing` MSI and disable auto
409-
instrumentation, include the following in your recipe and restart all
410-
applicable services:
411-
```
412-
windows_package 'SignalFx .NET Tracing 64-bit' do
413-
action :remove
414-
end
415-
416-
# If the "signalfx_dotnet_auto_instrumentation_system_wide" option was set to
417-
# "true", include the following to remove the values from the
418-
# "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
419-
# registry key:
420-
421-
registry_key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' do
422-
values [
423-
{ name: 'COR_ENABLE_PROFILING', type: :string, data: '' },
424-
{ name: 'COR_PROFILER', type: :string, data: '' },
425-
{ name: 'CORECLR_ENABLE_PROFILING', type: :string, data: '' },
426-
{ name: 'CORECLR_PROFILER', type: :string, data: '' },
427-
{ name: 'SIGNALFX_ENV', type: :string, data: '' },
428-
{ name: 'SIGNALFX_PROFILER_ENABLED', type: :string, data: '' },
429-
{ name: 'SIGNALFX_PROFILER_MEMORY_ENABLED', type: :string, data: '' },
430-
{ name: 'SIGNALFX_SERVICE_NAME', type: :string, data: '' },
431-
]
432-
action :delete
433-
end
434-
```
302+
### SignalFx Auto Instrumentation for .NET on Windows
303+
304+
The option to install the [SignalFx Auto Instrumentation for .NET](
305+
https://docs.splunk.com/Observability/gdi/get-data-in/application/dotnet/get-started.html)
306+
`with_signalfx_dotnet_auto_instrumentation` is deprecated and
307+
will have no effect after release `0.16.0`.
308+
Install the [Splunk Distribution of OpenTelemetry .NET](https://docs.splunk.com/observability/en/gdi/get-data-in/application/otel-dotnet/get-started.html#instrument-net-applications-for-splunk-observability-cloud-opentelemetry)
309+
instead.

deployments/chef/attributes/default.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,6 @@
5050
default['splunk_otel_collector']['fluentd_config_dest'] = "#{ENV['SystemDrive']}\\opt\\td-agent\\etc\\td-agent\\td-agent.conf"
5151
default['splunk_otel_collector']['fluentd_version_file'] = "#{collector_install_dir}\\fluentd_version.txt"
5252

53-
default['splunk_otel_collector']['with_signalfx_dotnet_auto_instrumentation'] = false
54-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_version'] = '1.1.0'
55-
56-
signalfx_dotnet_base_url = 'https://github.com/signalfx/signalfx-dotnet-tracing/releases/download'
57-
signalfx_dotnet_version = node['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_version'].sub(/^v/, '')
58-
signalfx_dotnet_msi_name = "signalfx-dotnet-tracing-#{signalfx_dotnet_version}-x64.msi"
59-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_msi_url'] = "#{signalfx_dotnet_base_url}/v#{signalfx_dotnet_version}/#{signalfx_dotnet_msi_name}"
60-
61-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_iisreset'] = true
62-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_system_wide'] = false
63-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_environment'] = ''
64-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_service_name'] = ''
65-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_enable_profiler'] = false
66-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_enable_profiler_memory'] = false
67-
default['splunk_otel_collector']['signalfx_dotnet_auto_instrumentation_additional_options'] = {}
6853
elsif platform_family?('debian', 'rhel', 'amazon', 'suse')
6954
default['splunk_otel_collector']['collector_version'] = 'latest'
7055

deployments/chef/kitchen.windows.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -64,39 +64,3 @@ suites:
6464
name: shell
6565
remote_exec: true
6666
command: inspec exec custom_vars/test.rb
67-
68-
- name: with_default_windows_dotnet_instrumentation
69-
run_list:
70-
- recipe[splunk_otel_collector]
71-
attributes:
72-
splunk_otel_collector:
73-
splunk_access_token: testing123
74-
splunk_realm: test
75-
with_signalfx_dotnet_auto_instrumentation: true
76-
verifier:
77-
name: shell
78-
remote_exec: true
79-
command: inspec exec with_default_windows_dotnet_instrumentation/test.rb
80-
81-
- name: with_custom_windows_dotnet_instrumentation
82-
run_list:
83-
- recipe[splunk_otel_collector]
84-
attributes:
85-
splunk_otel_collector:
86-
splunk_access_token: testing123
87-
splunk_realm: test
88-
with_signalfx_dotnet_auto_instrumentation: true
89-
signalfx_dotnet_auto_instrumentation_iisreset: false
90-
signalfx_dotnet_auto_instrumentation_version: 1.0.0
91-
signalfx_dotnet_auto_instrumentation_system_wide: true
92-
signalfx_dotnet_auto_instrumentation_environment: test-env
93-
signalfx_dotnet_auto_instrumentation_service_name: test-service
94-
signalfx_dotnet_auto_instrumentation_enable_profiler: true
95-
signalfx_dotnet_auto_instrumentation_enable_profiler_memory: true
96-
signalfx_dotnet_auto_instrumentation_additional_options:
97-
MY_CUSTOM_OPTION1: value1
98-
MY_CUSTOM_OPTION2: value2
99-
verifier:
100-
name: shell
101-
remote_exec: true
102-
command: inspec exec with_custom_windows_dotnet_instrumentation/test.rb

deployments/chef/recipes/default.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
if node['splunk_otel_collector']['with_fluentd'].to_s.downcase == 'true'
4343
include_recipe 'splunk_otel_collector::fluentd_win_install'
4444
end
45-
46-
if node['splunk_otel_collector']['with_signalfx_dotnet_auto_instrumentation'].to_s.downcase == 'true'
47-
include_recipe 'splunk_otel_collector::dotnet_instrumentation_win_install'
48-
end
4945
elsif platform_family?('debian', 'rhel', 'amazon', 'suse')
5046
if platform_family?('debian')
5147
package %w(apt-transport-https gnupg)

deployments/chef/recipes/dotnet_instrumentation_win_install.rb

Lines changed: 0 additions & 66 deletions
This file was deleted.

deployments/chef/test/integration/with_custom_windows_dotnet_instrumentation/test.rb

Lines changed: 0 additions & 38 deletions
This file was deleted.

deployments/chef/test/integration/with_default_windows_dotnet_instrumentation/test.rb

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)