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

LD_PRELOAD-based injection #3731

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmanciop
Copy link

@mmanciop mmanciop commented Feb 21, 2025

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:

  1. How can the LD_PRELOAD-based injector reuse configurations from other instrumentations, e.g., instrumentation image versions or Java Extensions?

  2. 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

  • Introduce C linter for injector code
  • Set default of enable-injector-instrumentation to false (this feature is as "experimental" as they come)
  • Establish versioning scheme of injector image
  • Injector Image CI build
  • More documentation

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

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.

Use LD_PRELOAD for setting environment variables e.g. JAVA_TOOL_OPTIONS / OTEL_
1 participant