直接从 https://github.com/fengzhongke/java-tracer/blob/master/java-tracer.jar 下载到本地 或者下载源码包 mvn clean package 打包,在项目根目录下面就有一个java-tracer.jar
运行进程如下
- 如果使用命令行启动java进程 java -javaagent:xxx/tracer-agent/target/java-tracer.jar xxx
- 使用IDE启动进程 增加-javaagent:xxx/tracer-agent/target/java-tracer.jar 到VM启动参数
游览器访问 http://127.0.0.1:18902 页面功能包括
- 系统信息,包括 a.classLoader&class信息,b.thread信息
- 设置需要跟踪的类(cname)、方法(mname)、保存链路跟踪个数(size)
- 查看链路
you can download from https://github.com/fengzhongke/java-tracer/blob/master/java-tracer.jar to local storage or download source and use maven to package and then in the root directory you can find java-tracer.jar
running java process as follow
- with commond: java -javaagent:xxx/tracer-agent/target/java-tracer.jar xxx
- with IDE add -javaagent:xxx/tracer-agent/target/java-tracer.jar to VM arguments
visit http://127.0.0.1:18902/tracer/info see results as follow use browser to visit http://127.0.0.1:18902 actions include
- system infomation include a.classLoader&class detail,b.intime thread detail
- to set class(cname) and method(mname) to trace and numbers of trace result to retain
- view the trance
END