-
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.
- Loading branch information
1 parent
af4f156
commit 9aeec20
Showing
13 changed files
with
320 additions
and
12 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
5 changes: 5 additions & 0 deletions
5
deployments/chef/templates/00-splunk-otel-auto-instrumentation.conf.erb
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,13 @@ | ||
NODE_OPTIONS=-r @splunk/otel/instrument | ||
<% 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
49 changes: 49 additions & 0 deletions
49
...stom_preload_node_instrumentation/inspec/with_custom_preload_node_instrumentation_spec.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,49 @@ | ||
libsplunk_path = '/usr/lib/splunk-instrumentation/libsplunk.so' | ||
node_options = '-r @splunk/otel/instrument' | ||
otlp_endpoint = 'http://0.0.0.0:4317' | ||
ld_preload_line = '# my extra library' | ||
|
||
describe package('splunk-otel-auto-instrumentation') do | ||
it { should be_installed } | ||
end | ||
|
||
describe npm('@splunk/otel') do | ||
it { should 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('/usr/lib/splunk-instrumentation/instrumentation.conf') do | ||
it { should_not exist } | ||
end | ||
|
||
describe file('/etc/splunk/zeroconfig/node.conf') do | ||
its('content') { should match /^NODE_OPTIONS=#{node_options}$/ } | ||
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
Oops, something went wrong.