A system module that hooks into the operating system's execve function to automatically load APM (Application Performance Monitoring) agents.
Key Features:
- Automatically detects the programming language of target applications
- Injects necessary environment variables based on the detected language-specific APM agent
- Auto-generates ServiceName (currently Java only)
- Maintains seamless program execution flow
- Run
make distto create installation files, then executebash install.shfor local installation - Run
make releaseto createinstall-apo-instrument.tar.gzpackage for deployment on other machines
Remove the following line from /etc/ld.so.preload:
/etc/apo/instrument/libapolanucher.so
If this is the only line in the file, you can safely remove the entire /etc/ld.so.preload file.
Restart your terminal session to complete the uninstallation.
Troubleshooting
If SSH access becomes unavailable due to preload issues, you can fix it by either:
- Using
scpto copy an empty file to overwrite/etc/ld.so.preloadon the target machine - Completing the uninstallation process
To clean up remaining files afterward:
rm -r /etc/apo
The preload hook takes effect for all program executions immediately after running install.sh.
After installing on the host machine, add these parameters when starting containers:
-v /etc/apo:/etc/apo
-e LD_PRELOAD=/etc/apo/instrument/libapolanucher.so
The -v flag mounts the agent files, while -e enables the preload library.
Example:
Original docker command:
docker run -d exampleApp:tag
Modified command:
docker run -d \
-v /etc/apo:/etc/apo \
-e LD_PRELOAD=/etc/apo/instrument/libapolanucher.so \
exampleApp:tag