Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR is a (very) early experiment of using LD_PRELOAD-based injection in the autoinstrumentation performed by the operator.
It can only inject Java for now, as a proof of concept. I am positive that all other instrumentations where there are no dependencies to libc flavors (i.e., Python and .NET) can be supported with little effort, especially if we agree on a way to reuse instrumentation images (see open questions below).
Open questions
There are two main issues to deal with before proceeding further:
How can the LD_PRELOAD-based injector reuse configurations from other instrumentations, e.g., instrumentation image versions or Java Extensions?
How to deal with the languages (Python and .NET specifically) that cannot currently be injected reliably due to dependencies in the libc version used within the container, which cannot be determined at webhook time without user-provided configurations (which is a terminally bad UX imo). Also, the libc flavor can change between containers in the same pod, and therefore pod-based annotations are generally technically not good enough to provide full coverage to all containers.
Known TODOs
enable-injector-instrumentation
tofalse
(this feature is as "experimental" as they come)Link to tracking Issue(s):
Testing: Unit + e2e tests, but many more of the latter are needed
Documentation: Extended README.md to an extent comparable to other
autoinstrumentation