- Add your app dependency, then create your btrace script.
- Compile btrace script by
mvn install. - Get the class of btrace script from directory
target. - Upload the class of the btrace script to the machine that the java process you want to trace is running on.
- Run Command:
btrace <pid> <btrace script class>
This project contains the example code from btrace, so you can simply copy and use it.