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

multiple application/languages running in the same container flip-flop the instrumentation #1084

Open
esara opened this issue Mar 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@esara
Copy link
Contributor

esara commented Mar 22, 2024

Describe the bug
We have containers where the container runs more then one process, one in java and another process is in python.
The actual use cases is that the main business logic is in java, but python provides a diagnostics interface.
During autoinstrumentation odigos sometimes finds the java process and later finds the python process, changes the instrumentedapp cr and restarts the application with a different instrumenation (only one of them).

To Reproduce
Create a docker image with a java process as pid1, but also a python background process running like:

$ cat entrypoint.sh 

export STARTUP_COMMAND="java $JAVA_OPTS -jar $@"

# Start up the http server
/usr/bin/nohup /diags.py >/tmp/diags.log &

echo "Executing startup command: \"$STARTUP_COMMAND\""
exec env PATH=$PATH $STARTUP_COMMAND

Expected behavior
a) It would be great to detect the language of the pid 1 process as this should be consistent and not change even after the restart of the process.
b) Alternatively, we can detect multiple languages and inject the instrumentation and env variables to all detected languages

@rauno56
Copy link
Contributor

rauno56 commented Mar 26, 2024

Thanks for reporting this and #1085. Both of those are good catches and something we are definitely going to address. We've been working on other bugs to do with our controller reconciliation loops recently as well.

Meanwhile, if there's anyone else who wants to take a look and needs a sparring partner, reach out to the team on slack!

@rauno56 rauno56 added the bug Something isn't working label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants