-
Notifications
You must be signed in to change notification settings - Fork 169
chef: support .NET zero config on linux #4763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arm support was just added with the recent https://github.com/signalfx/splunk-otel-dotnet/releases/tag/v1.5.0 release. Should we account for this in this PR?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll first need to update and release our
splunk-otel-auto-instrumentation
deb/rpm packages to include thesplunk-otel-dotnet
arm64 package before we can add support in our installers.