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 tests for express instrumentation #3566

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Conversation

jeffreyc-splunk
Copy link
Contributor

@jeffreyc-splunk jeffreyc-splunk commented Sep 1, 2023

  • Distro images updated to install node, express, and sample app
  • Added test to simulate manual installation of the splunk-otel-auto-instrumentation package for both amd64 and arm64:
    • Install python3 and development package dependencies required for splunk-otel-js:
      • suse: devel_basis, devel_C_C++
      • amazon/rhel: Development Tools
      • debian/ubuntu: build-essential
    • Install splunk-otel-js with npm
    • Test preload and systemd-only instrumentation methods for the sample express app, with default and custom configs

Comment on lines +303 to +314
# minimum supported node version required for profiling
node_version = "v16"

if distro in ("centos-7", "oraclelinux-7"):
# g++ for these distros is too old to install splunk-otel-js with node v16:
# g++: error: unrecognized command line option '-std=gnu++14'
# use the minimum supported node version without profiling instead
node_version = "v14"
elif distro in ("debian-stretch", "ubuntu-xenial"):
# these distros only provide python 3.5, but node v16 requires python 3.6+
# use the minimum supported node version without profiling instead
node_version = "v14"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Limitations for older distros.

@atoulme
Copy link
Contributor

atoulme commented Sep 1, 2023

LGTM. I want to work on this in the long term dev branch, so I might merge this now if that's ok.

@jeffreyc-splunk
Copy link
Contributor Author

LGTM. I want to work on this in the long term dev branch, so I might merge this now if that's ok.

Works for me.

@atoulme atoulme merged commit fd0bb00 into zero-config-dev Sep 1, 2023
@delete-merged-branch delete-merged-branch bot deleted the zc-node-test branch September 1, 2023 21:05
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.

2 participants