Skip to content
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

DNM: Allow systemd-only auto instrumentation #3489

Closed
wants to merge 1 commit into from

Conversation

jeffreyc-splunk
Copy link
Contributor

  • Leave splunk-otel-auto-instrumentation and libsplunk.so as-is (moved code from instrumentation/ to instrumentation/splunk-otel-auto-instrumentation/)
  • Build new splunk-otel-systemd-auto-instrumentation that includes the java agent and a systemd drop-in file with JAVA_TOOL_OPTIONS
  • Add tomcat tests to verify default and custom attributes are received by the collector with either package installed
    • the systemd package will only be tested when tomcat is running in systemd
    • the original package will be tested when tomcat is running with and without systemd

TODO: Update installers to support the systemd package and configuration.

@jeffreyc-splunk jeffreyc-splunk force-pushed the systemd-auto-instrumentation branch from 6a04886 to 6660db1 Compare August 11, 2023 21:17
> 1. To prevent conflicts and duplicate traces/metrics, only one package should be installed on the target system.
> 2. The configuration files and the options defined within are only applicable for the respective package that is
> installed. For example, `/usr/lib/splunk-instrumentation/instrumentation.conf` is only applicable with
> `splunk-otel-auto-instrumentation`, and `` is only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> `splunk-otel-auto-instrumentation`, and `` is only
> `splunk-otel-auto-instrumentation`, and `00-splunk-otel-javaagent.conf` is only

Should this be a reference to the systemd drop-in file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I'll update it.

./packaging/00-splunk-otel-javaagent.conf) drop-in file defines the following environment variables to
enable the installed agent(s) to auto instrument supported Java applications running as `systemd` services:

- `JAVA_TOOL_OPTIONS=-javaagent:/usr/lib/splunk-instrumentation/splunk-otel-javaagent.jar`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add OTEL_EXPORTER_OTLP_ENDPOINT as a default option in the drop-in file too. Quick question: If there are specific options set from the installers (eg. deployment.environment) or profiling, would the relevant env variable be set here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add any environment variable to this file or in a separate drop-in file created by the installers.

@jeffreyc-splunk jeffreyc-splunk changed the title Allow systemd-only auto instrumentation DNM: Allow systemd-only auto instrumentation Aug 14, 2023
@jeffreyc-splunk
Copy link
Contributor Author

Closing this in favor of #3506

@jeffreyc-splunk jeffreyc-splunk deleted the systemd-auto-instrumentation branch November 8, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants