-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chef: support .NET zero config on linux
- Loading branch information
1 parent
a006288
commit eb80a37
Showing
30 changed files
with
528 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
maintainer_email '[email protected]' | ||
license 'Apache-2.0' | ||
description 'Install/Configure the Splunk OpenTelemetry Collector' | ||
version '0.13.0' | ||
version '0.14.0' | ||
chef_version '>= 16.0' | ||
|
||
supports 'amazon' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
CORECLR_ENABLE_PROFILING=1 | ||
CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658318} | ||
CORECLR_PROFILER_PATH=/usr/lib/splunk-instrumentation/splunk-otel-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so | ||
DOTNET_ADDITIONAL_DEPS=/usr/lib/splunk-instrumentation/splunk-otel-dotnet/AdditionalDeps | ||
DOTNET_SHARED_STORE=/usr/lib/splunk-instrumentation/splunk-otel-dotnet/store | ||
DOTNET_STARTUP_HOOKS=/usr/lib/splunk-instrumentation/splunk-otel-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll | ||
OTEL_DOTNET_AUTO_HOME=/usr/lib/splunk-instrumentation/splunk-otel-dotnet | ||
OTEL_DOTNET_AUTO_PLUGINS=Splunk.OpenTelemetry.AutoInstrumentation.Plugin,Splunk.OpenTelemetry.AutoInstrumentation | ||
<% if defined?(node['splunk_otel_collector']['auto_instrumentation_resource_attributes']) && node['splunk_otel_collector']['auto_instrumentation_resource_attributes'] != "" -%> | ||
OTEL_RESOURCE_ATTRIBUTES=splunk.zc.method=splunk-otel-auto-instrumentation-<%= @installed_version %>,<%= node['splunk_otel_collector']['auto_instrumentation_resource_attributes'] %> | ||
<% else -%> | ||
OTEL_RESOURCE_ATTRIBUTES=splunk.zc.method=splunk-otel-auto-instrumentation-<%= @installed_version %> | ||
<% end -%> | ||
<% if defined?(node['splunk_otel_collector']['auto_instrumentation_service_name']) && node['splunk_otel_collector']['auto_instrumentation_service_name'] != "" -%> | ||
OTEL_SERVICE_NAME=<%= node['splunk_otel_collector']['auto_instrumentation_service_name'] %> | ||
<% end -%> | ||
SPLUNK_PROFILER_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler'].to_s.downcase %> | ||
SPLUNK_PROFILER_MEMORY_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_profiler_memory'].to_s.downcase %> | ||
SPLUNK_METRICS_ENABLED=<%= node['splunk_otel_collector']['auto_instrumentation_enable_metrics'].to_s.downcase %> | ||
OTEL_EXPORTER_OTLP_ENDPOINT=<%= node['splunk_otel_collector']['auto_instrumentation_otlp_endpoint'] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
deployments/chef/test/integration/with_custom_preload_dotnet_instrumentation/test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' | ||
resource_attributes = 'splunk.zc.method=splunk-otel-auto-instrumentation-\d+\.\d+\.\d+,deployment.environment=test' | ||
otlp_endpoint = 'http://0.0.0.0:4317' | ||
ld_preload_line = '# my extra library' | ||
dotnet_home = '/usr/lib/splunk-instrumentation/splunk-otel-dotnet' | ||
|
||
describe package('splunk-otel-auto-instrumentation') do | ||
it { should be_installed } | ||
end | ||
|
||
describe npm('@splunk/otel', path: '/usr/lib/splunk-instrumentation/splunk-otel-js') do | ||
it { should_not be_installed } | ||
end | ||
|
||
describe file('/etc/ld.so.preload') do | ||
its('content') { should match /^#{libsplunk_path}$/ } | ||
its('content') { should match /^#{ld_preload_line}$/ } | ||
end | ||
|
||
describe file('/usr/lib/systemd/system.conf.d/00-splunk-otel-auto-instrumentation.conf') do | ||
it { should_not exist } | ||
end | ||
|
||
describe file('/etc/splunk/zeroconfig/java.conf') do | ||
it { should_not exist } | ||
end | ||
|
||
describe file('/etc/splunk/zeroconfig/node.conf') do | ||
it { should_not exist } | ||
end | ||
|
||
describe file('/usr/lib/splunk-instrumentation/instrumentation.conf') do | ||
it { should_not exist } | ||
end | ||
|
||
describe file('/etc/splunk/zeroconfig/dotnet.conf') do | ||
its('content') { should match /^CORECLR_ENABLE_PROFILING=1$/ } | ||
its('content') { should match /^CORECLR_PROFILER=\{918728DD-259F-4A6A-AC2B-B85E1B658318\}$/ } | ||
its('content') { should match %r{^CORECLR_PROFILER_PATH=#{dotnet_home}/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so$} } | ||
its('content') { should match %r{^DOTNET_ADDITIONAL_DEPS=#{dotnet_home}/AdditionalDeps$} } | ||
its('content') { should match %r{^DOTNET_SHARED_STORE=#{dotnet_home}/store$} } | ||
its('content') { should match %r{^DOTNET_STARTUP_HOOKS=#{dotnet_home}/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll$} } | ||
its('content') { should match /^OTEL_DOTNET_AUTO_HOME=#{dotnet_home}$/ } | ||
its('content') { should match /^OTEL_DOTNET_AUTO_PLUGINS=Splunk.OpenTelemetry.AutoInstrumentation.Plugin,Splunk.OpenTelemetry.AutoInstrumentation$/ } | ||
its('content') { should match /^OTEL_RESOURCE_ATTRIBUTES=#{resource_attributes}$/ } | ||
its('content') { should match /^OTEL_SERVICE_NAME=test$/ } | ||
its('content') { should match /^SPLUNK_PROFILER_ENABLED=true$/ } | ||
its('content') { should match /^SPLUNK_PROFILER_MEMORY_ENABLED=true$/ } | ||
its('content') { should match /^SPLUNK_METRICS_ENABLED=true$/ } | ||
its('content') { should match /^OTEL_EXPORTER_OTLP_ENDPOINT=#{otlp_endpoint}$/ } | ||
end | ||
|
||
describe service('splunk-otel-collector') do | ||
it { should be_enabled } | ||
it { should be_running } | ||
end | ||
|
||
describe service('td-agent') do | ||
it { should_not be_enabled } | ||
it { should_not be_running } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.