-
Notifications
You must be signed in to change notification settings - Fork 480
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
Use LD_PRELOAD for setting environment variables e.g. JAVA_TOOL_OPTIONS / OTEL_ #2375
Comments
@pavolloffay, are you working on it or can I take this one? |
I haven't started. I think this needs maybe a POC and see what are the other implications. |
OG of the Lumigo operator here :-) We do this in the Dash0 operator (fully OSS), and while I personally built it as well in the Lumigo operator a couple of years ago, the injector there is not OSS iirc. We have used
(Additional tidbits in this blog post.) From Dash0's side, we'd be delighted to see |
Besides, the |
@mmanciop thanks for looping in. We would appreciate collaboration on this feature 👍🏼 https://lumigo.io/blog/the-magic-behind-the-lumigo-kubernetes-operator/ mentions that the init-container is also used to copy the instrumentation/SDK. Does it mean that the docker image for the init container needs to bundle instrumentation for all languages? |
Yes, the init container image must bundle all languages that the LD_PRELOAD can activate. And of course the LD_PRELOAD object itself. |
Hi there, I would like to inquire about any updates or progress on the feature related to concatenating JAVA_TOOL_OPTIONS with OpenTelemetry auto-instrumentation agent options. As of now, it seems that it is only possible to concatenate environment variables explicitly defined within the deployment YAML under the env section. However, it appears that concatenation of the values from JAVA_TOOL_OPTIONS with the OpenTelemetry agent options (e.g., -javaagent or other configuration flags) is still not supported or automatic. Could you please clarify whether this functionality is in the works or if there are any workarounds available? Any update would be greatly appreciated! Thank you for your time and efforts. |
Hi @berezinsn , it's a functionality we have working with the Dash0 operator and that I would love to contribute upstream. In your specific case, you maybe also use the |
Component(s)
No response
Is your feature request related to a problem? Please describe.
At the moment the operator sets the env variables directly on the pod spec. The downside is if user defines the same variables in docker image or in config map. The operator does not know anything about those env vars. The solution might be to use LD_PRELOAD to set and override env vars.
The same approach is used by Lumigo operator and probably other vendors. https://github.com/lumigo-io/lumigo-kubernetes-operator/blob/88a3f78e5a32b965210659db11ef97f2a0c6f6c6/controller/src/mutation/mutate.go#L50
This would also resolve #1814
Describe the solution you'd like
Use LD_PRELOAD to set env vars for the instrumentation CR.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: