From 8299e205f4095424113f95f9fb25fb9bbd788f3c Mon Sep 17 00:00:00 2001 From: jeffreyc-splunk Date: Wed, 23 Aug 2023 13:57:26 -0400 Subject: [PATCH] Update manual instructions --- docs/getting-started/linux-manual.md | 55 +++++++++++++------ .../systemd/00-splunk-otel-javaagent.conf | 11 ++-- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/docs/getting-started/linux-manual.md b/docs/getting-started/linux-manual.md index 93edbef9dc..5a6f10321c 100644 --- a/docs/getting-started/linux-manual.md +++ b/docs/getting-started/linux-manual.md @@ -328,24 +328,43 @@ and install it with the following commands (requires `root` privileges). #### Auto Instrumentation Post-Install Configuration -- The `/etc/ld.so.preload` file will be automatically created/updated with the - default path to the installed instrumentation library - (`/usr/lib/splunk-instrumentation/libsplunk.so`). If necessary, custom - library paths can be manually added to this file. -- The `/usr/lib/splunk-instrumentation/instrumentation.conf` configuration file - can be manually configured for resource attributes and other parameters. By - default, this file will contain the `java_agent_jar` parameter set to the - path of the installed [Java Instrumentation Agent]( - https://github.com/signalfx/splunk-otel-java) - (`/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar`). - -See [Linux Java Auto Instrumentation](https://github.com/signalfx/splunk-otel-collector/tree/main/instrumentation#linux-java-auto-instrumentation) -for more details. - -**Note:** After installation/upgrade or any configuration changes, the Java -application(s) on the host need to be manually started/restarted for automatic -instrumentation to take effect and/or to source the updated values in the -configuration file. +Choose one of the following methods to activate and configure Splunk +OpenTelemetry Auto Instrumentation ***globally*** with either the provided +`libsplunk.so` shared object library or sample `systemd` drop-in files. To +activate and configure auto instrumentation for individual services or +applications, see +[Instrument back-end applications to send spans to Splunk APM]( +https://docs.splunk.com/Observability/gdi/get-data-in/application/application.html). + +1. Preload method + - The `/usr/lib/splunk-instrumentation/libsplunk.so` shared object library + can be added to the [`/etc/ld.so.preload`]( + https://man7.org/linux/man-pages/man8/ld.so.8.html#FILES) file to activate + auto instrumentation for ***all*** supported processes. + - The `/usr/lib/splunk-instrumentation/instrumentation.conf` configuration + file can be configured for resource attributes and other supported + parameters. By default, this file will contain the `java_agent_jar` + parameter set to the path of the installed [Java Instrumentation Agent]( + https://github.com/signalfx/splunk-otel-java) + (`/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar`). + - See [Linux Java Auto Instrumentation](../../instrumentation/libsplunk.md) + for more details. + +2. `Systemd` method + - The sample `systemd` drop-in files in the + `/usr/lib/splunk-instrumentation/examples/systemd/` directory can be + configured and copied to the host's [`systemd` configuration + directory]( + https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html), + for example `/usr/lib/systemd/system.conf.d/`, to activate and + configure auto instrumentation for ***all*** supported applications + running as `systemd` services. + - See [Splunk OpenTelemetry Zero Configuration Auto Instrumentation for + Systemd](../../instrumentation/systemd.md) for more details. + +**Note:** After installation/upgrade or any configuration changes, reboot the +system or restart the application(s) on the host for automatic instrumentation +to take effect and/or to source the updated values. #### Fluentd diff --git a/instrumentation/packaging/fpm/examples/systemd/00-splunk-otel-javaagent.conf b/instrumentation/packaging/fpm/examples/systemd/00-splunk-otel-javaagent.conf index 9a16c133e0..316dd783a2 100644 --- a/instrumentation/packaging/fpm/examples/systemd/00-splunk-otel-javaagent.conf +++ b/instrumentation/packaging/fpm/examples/systemd/00-splunk-otel-javaagent.conf @@ -12,11 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Sample systemd drop-in file to define the default environment variables for Splunk OpenTelemetry Auto Instrumentation for Java +# Sample systemd drop-in file to activate and configure Splunk OpenTelemetry Auto Instrumentation for Java -# To use this file to enable/configure auto instrumentation for all Java applications running as systemd services (requires root privileges): +# To use this file to activate/configure auto instrumentation for all supported Java applications running as systemd +# services (requires root privileges): # 1. See https://docs.splunk.com/Observability/gdi/get-data-in/application/java/configuration/advanced-java-otel-configuration.html -# for supported environment variables and defaults for the Java agent +# for supported environment variables and defaults for Java auto instrumentation # 2. Add/Update the DefaultEnvironment entries below for the desired environment variables and values # 3. Copy this file to the systemd configuration directory, e.g. /usr/lib/systemd/system.conf.d # 4. Reboot the system or run the following commands to restart the applicable service(s) for any changes to take effect: @@ -24,10 +25,10 @@ # $ sudo systemctl restart # replace "" and run for each applicable service # See https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html for general information -# about systemd configuration and supported options. +# about systemd configuration and other supported options. [Manager] -# Required to enable the Splunk OpenTelemetry Auto Instrumentation for Java agent +# Required to activate Splunk OpenTelemetry Auto Instrumentation for Java DefaultEnvironment="JAVA_TOOL_OPTIONS=-javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar" # Examples of common configuration options: