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

Add systemd sample file to splunk-otel-auto-instrumention #3506

Merged
merged 5 commits into from
Aug 29, 2023

Conversation

jeffreyc-splunk
Copy link
Contributor

@jeffreyc-splunk jeffreyc-splunk commented Aug 14, 2023

  • Include sample systemd drop-in file in the splunk-otel-auto-instrumentation package that can be manually copied to the systemd config directory to enable the java agent for systemd services (this will be handled automatically by the installers if systemd auto instrumentation is enabled)
  • Include default /etc/splunk/zeroconfig_java.conf
  • Remove automatic addition of libsplunk.so to /etc/ld.so.preload when the package is installed (this will be handled automatically by the installers only if system-wide auto instrumentation is enabled)
  • libsplunk.so will be automatically removed from /etc/ld.so.preload (if it exists) when the package is uninstalled (unchanged from current behavior)
  • Add tests that simulate the manual steps above and verify configured attributes for tomcat

@jeffreyc-splunk jeffreyc-splunk changed the title Add systemd sample file to splunk-otel-auto-instrumention DNM: Add systemd sample file to splunk-otel-auto-instrumention Aug 14, 2023
@jeffreyc-splunk jeffreyc-splunk force-pushed the new-auto-instrumentation branch 2 times, most recently from eb89cd0 to 81ff4fc Compare August 14, 2023 18:03
@@ -0,0 +1,181 @@
# Linux Java Auto Instrumentation
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was renamed from https://github.com/signalfx/splunk-otel-collector/blob/main/instrumentation/README.md and the content was not modifed.

@jeffreyc-splunk jeffreyc-splunk force-pushed the new-auto-instrumentation branch 10 times, most recently from eb2e7d6 to c181818 Compare August 18, 2023 19:21
@jeffreyc-splunk jeffreyc-splunk force-pushed the new-auto-instrumentation branch 2 times, most recently from 3abe939 to dcccac6 Compare August 21, 2023 19:43
@jeffreyc-splunk jeffreyc-splunk force-pushed the new-auto-instrumentation branch from dcccac6 to ca1e01c Compare August 22, 2023 14:55
@jeffreyc-splunk jeffreyc-splunk changed the title DNM: Add systemd sample file to splunk-otel-auto-instrumention Add systemd sample file to splunk-otel-auto-instrumention Aug 22, 2023
@jeffreyc-splunk jeffreyc-splunk force-pushed the new-auto-instrumentation branch from ca1e01c to 5f6df2b Compare August 23, 2023 17:58
@jeffreyc-splunk jeffreyc-splunk changed the base branch from main to zero-config-dev August 25, 2023 18:43
@jeffreyc-splunk jeffreyc-splunk force-pushed the new-auto-instrumentation branch 2 times, most recently from bb675a3 to 8299e20 Compare August 25, 2023 18:50
@jeffreyc-splunk jeffreyc-splunk force-pushed the new-auto-instrumentation branch from 8299e20 to a3b57c4 Compare August 28, 2023 22:28

## Configuration File

At startup, the shared object reads the config file, `/usr/lib/splunk-instrumentation/instrumentation.conf` which by
Copy link
Contributor

Choose a reason for hiding this comment

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

this will no longer be true, but we can check those docs in the next PR.

@@ -0,0 +1 @@
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.

need a newline

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe there's a newline, sorry. I can't quite tell from github's web UI.

assert elapsed < timeout, f"timed out waiting for '{cmd}':\n{output.decode('utf-8')}"
time.sleep(1)


Copy link
Contributor

Choose a reason for hiding this comment

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

this can be peeled off to a separate PR for main to simplify the diff a bit

@jeffreyc-splunk jeffreyc-splunk marked this pull request as ready for review August 29, 2023 14:30
@jeffreyc-splunk jeffreyc-splunk requested review from a team as code owners August 29, 2023 14:30
@jeffreyc-splunk jeffreyc-splunk merged commit 9765a3f into zero-config-dev Aug 29, 2023
@delete-merged-branch delete-merged-branch bot deleted the new-auto-instrumentation branch August 29, 2023 14:30
jeffreyc-splunk added a commit that referenced this pull request Sep 1, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Sep 1, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Sep 7, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Sep 8, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Sep 14, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Sep 21, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Sep 25, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Sep 26, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 3, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 3, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 9, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 11, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 16, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 16, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 16, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 16, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
jeffreyc-splunk added a commit that referenced this pull request Oct 18, 2023
* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch
atoulme added a commit that referenced this pull request Oct 18, 2023
* [DNM] Zero-config C code to inject environment variables for Java and Node.js (#3514)

* Remove sending a metric as part of auto-instrumentation (#3482)

* refactor the code to inject allowed env vars

* latest after pair programming

* latest after review and pairing

* only inject env vars for java and nodejs programs. Apply env vars from different files for java and nodejs

* remove docker interactive and tty flags

* wip

* use arch var to set the name of the file to copy

* make tests pass on arm64

* try to support arm

* build for the proper platform

* fix package build

* review with Jason, test for env vars overrides

* Make ALLOWED_ENV_VARS a single string defined through the preprocessor

* Update instrumentation/tests/java/Dockerfile

Co-authored-by: Jeff Cheng <83052155+jeffreyc-splunk@users.noreply.github.com>

* load preload file same way as java test

* move file locations to macros

* use n functions to handle strings when possible

---------

Co-authored-by: Jeff Cheng <83052155+jeffreyc-splunk@users.noreply.github.com>

* Add systemd sample file to splunk-otel-auto-instrumention (#3506)

* Add systemd sample file to splunk-otel-auto-instrumention

* Update manual instructions

* Include default /etc/splunk/zeroconfig_java.conf in deb/rpm packages

* Update tests for new libsplunk.so

* Run auto instrumentation workflow for the zero-config-dev branch

* Include splunk-otel-js in auto instrumentation deb/rpm (#3540)

* Add systemd sample file to splunk-otel-auto-instrumention

* Update tests for new libsplunk.so

* Include splunk-otel-js in auto instrumentation deb/rpm

* Include default /etc/splunk/zeroconfig_node.conf in deb/rpm packages

* Add tests for express instrumentation (#3566)

* Update installer script for systemd auto instrumentation (#3536)

* Rename zeroconfig config files (#3682)

* Update ZC docs and tests for manual installation/configuration (#3700)

* Update docs

* Update splunk-otel-js to v2.4.2

* Combine sample systemd config files

* Install splunk-otel-js globally for tests

* Update deps installation for node tests

* Update splunk-otel-js to v2.4.4

* Update linux-manual.md

* Update test for centos/oraclelinux 7 arm64

---------

Co-authored-by: Anna U <104845867+aurbiztondo-splunk@users.noreply.github.com>

* Update otlp endpoint for linux installer script (#3761)

* Update otlp endpoint for linux installer script

* remove 0.0.0.0

* Add debian bookworm for instrumentation tests

* Update CHANGELOG.md

---------

Co-authored-by: Antoine Toulme <antoine@lunar-ocean.com>
Co-authored-by: Anna U <104845867+aurbiztondo-splunk@users.noreply.github.com>
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.

3 participants