-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auto instrumentation support to salt (#1686)
- Loading branch information
1 parent
5399d77
commit 95b30ee
Showing
7 changed files
with
194 additions
and
40 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
37 changes: 37 additions & 0 deletions
37
deployments/salt/splunk-otel-collector/auto_instrumentation.sls
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,37 @@ | ||
{% set auto_instrumentation_version = salt['pillar.get']('splunk-otel-collector:auto_instrumentation_version', 'latest') %} | ||
{% set auto_instrumentation_java_agent_path = salt['pillar.get']('splunk-otel-collector:auto_instrumentation_java_agent_path', '/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar') %} | ||
{% set auto_instrumentation_ld_so_preload = salt['pillar.get']('splunk-otel-collector:auto_instrumentation_ld_so_preload') %} | ||
{% set auto_instrumentation_resource_attributes = salt['pillar.get']('splunk-otel-collector:auto_instrumentation_resource_attributes') %} | ||
{% set auto_instrumentation_service_name = salt['pillar.get']('splunk-otel-collector:auto_instrumentation_service_name') %} | ||
|
||
Install Splunk OpenTelemetry Auto Instrumentation: | ||
pkg.installed: | ||
- name: splunk-otel-auto-instrumentation | ||
- version: {{ auto_instrumentation_version }} | ||
- require: | ||
- pkg: splunk-otel-collector | ||
|
||
/etc/ld.so.preload: | ||
file.managed: | ||
- contents: | ||
- /usr/lib/splunk-instrumentation/libsplunk.so | ||
{% if auto_instrumentation_ld_so_preload %} | ||
- {{ auto_instrumentation_ld_so_preload }} | ||
{% endif %} | ||
- makedirs: True | ||
- require: | ||
- pkg: splunk-otel-auto-instrumentation | ||
|
||
/usr/lib/splunk-instrumentation/instrumentation.conf: | ||
file.managed: | ||
- contents: | ||
- java_agent_jar={{ auto_instrumentation_java_agent_path }} | ||
{% if auto_instrumentation_resource_attributes %} | ||
- resource_attributes={{ auto_instrumentation_resource_attributes }} | ||
{% endif %} | ||
{% if auto_instrumentation_service_name %} | ||
- service_name={{ auto_instrumentation_service_name }} | ||
{% endif %} | ||
- makedirs: True | ||
- require: | ||
- pkg: splunk-otel-auto-instrumentation |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ markers = | |
instrumentation | ||
puppet | ||
rpm | ||
salt |