Skip to content

Install injection libraries with agent install script #39

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

Merged
merged 12 commits into from
May 18, 2023

Conversation

randomanderson
Copy link
Contributor

(resubmission of #36)

This PR adds the ability to install autoinstrumentation libraries after setting environment variables.

Variable name Description
DD_APM_INSTRUMENTATION_ENABLED Install host and docker injection unless overridden with a more specific env variable
DD_APM_HOST_INJECTION_ENABLED Installs or prevents installation of host injection (via LD_PRELOAD)
DD_APM_DOCKER_INJECTION_ENABLED Installs or prevents installation of docker injection ( via daemon.json )
DD_APM_LIBRARIES Space separated list of which languages to install support for. Valid values are js, java, python, dotnet, all. Defaults to all if host or docker injection is enabled
DD_NO_AGENT_INSTALL If set, don't install the datadog agent. This is useful for the container injection only case. The check is for the existence of the variable, not any particular value. This mirrors DD_INSTALL_ONLY
  • The script does not verify that all combinations of new and existing variables make sense together (for instance DD_NO_AGENT_INSTALL and DD_AGENT_MINOR_VERSION)
  • I removed the Installing the $nice_flavor package log statement because it is redundant with Installing package(s) ... line that follows and is misleading in some cases.

Testing

I added few basic checks to the test suite. Only host injection could be tested because of the docker-in-docker issue.

@randomanderson randomanderson requested a review from a team as a code owner May 12, 2023 13:50
Copy link

@bkabrda bkabrda left a comment

Choose a reason for hiding this comment

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

LGTM and the CI is passing now. Thanks a lot for the PR, I'm merging it.

@bkabrda bkabrda merged commit aa2a0a7 into main May 18, 2023
@bkabrda bkabrda deleted the landerson/install-injection branch May 18, 2023 13:57
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