Skip to content

Commit

Permalink
Update manual instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk committed Aug 25, 2023
1 parent 1712c58 commit 8299e20
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 23 deletions.
55 changes: 37 additions & 18 deletions docs/getting-started/linux-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,23 @@
# 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:
# $ sudo systemctl daemon-reload
# $ sudo systemctl restart <service-name> # replace "<service-name>" 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:
Expand Down

0 comments on commit 8299e20

Please sign in to comment.