pinpoint實戰應用2

1.下載

下載pinpoint-agent的jar。也可以自己下載源碼編譯。

地址:https://github.com/naver/pinpoint/releases/download/1.8.5/pinpoint-agent-1.8.5.tar.gz

2.解壓

pinpoint實戰應用2

3.配置

修改pinpoint-agent-1.8.5中pinpoint.config

profiler.collector.ip=pinpoint-collector的地址,我的是192.168.199.101

profiler.collector.ip=192.168.199.101

pinpoint實戰應用2
pinpoint實戰應用2

o-eye-order項目:

-javaagent:E:\\pinpoint\\pinpoint-agent-1.8.5\\pinpoint-bootstrap-1.8.5.jar -Dpinpoint.agentId=o-eye-order -Dpinpoint.applicationName=o-eye-order

pinpoint實戰應用2
pinpoint實戰應用2

o-eye-show項目:

-javaagent:E:\\pinpoint\\pinpoint-agent-1.8.5\\pinpoint-bootstrap-1.8.5.jar -Dpinpoint.agentId=o-eye-show -Dpinpoint.applicationName=o-eye-show

pinpoint實戰應用2

4.啟動

分別啟動:o-eye-order和o-eye-show

pinpoint實戰應用2
pinpoint實戰應用2

5.訪問

http://localhost:8080/queryOrder?orderNo=1567912100014

pinpoint實戰應用2

此時查看一下zookeeper

pinpoint實戰應用2

6.登陸pinpoint

pinpoint實戰應用2

首先看一下:o-eye-order,可以看到調用圖。user-》o-eye-order-》數據庫。

pinpoint實戰應用2

查看右側,鼠標圈中部分點

pinpoint實戰應用2

查看詳情

pinpoint實戰應用2

選中其中一條記錄,查看那詳情,可以看到調用棧信息和執行時間,非常方便排查問題

pinpoint實戰應用2
pinpoint實戰應用2

查看其他信息,可以查看內存信息

pinpoint實戰應用2
pinpoint實戰應用2

類似的可以訪問o-eye-show項目

訪問:http://localhost:8080/queryOrder?orderNo=1569064820016

選擇o-eye-show

pinpoint實戰應用2

可以看到 User-》o-eye-show-》o-eye-order調用鏈

此外還有其他的調用鏈,如redis,mq等

pinpoint實戰應用2

分析其中一條調用鏈

pinpoint實戰應用2

如下調用圖:

pinpoint實戰應用2
pinpoint實戰應用2
pinpoint實戰應用2
pinpoint實戰應用2

這樣在pinpoint就可以快速定位問題了,a-》b-》c的鏈條了

好了,今天補充了一下。

在體驗中遇到一些問題:比如調用鏈不顯示等。關鍵是pinpoint.config配置文件。它裡面包含許多常用的配置。

以後有時間可以詳細說一下。今天就到這了。


分享到:


相關文章: