CloudBeaver docker鏡像集成arthas


打算學習下CloudBeaver ,但是無奈CloudBeaver源碼基於osgi,同時構建依賴的模塊復雜,所以基於arthas
的火焰圖功能梳理簡單提供一個CloudBeaver 查詢的處理流程

dockerfile

基於已經制作好的

 
FROM dalongrong/cloudbeaver:latest
COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas

環境准備

docker-compose 文件

version: "3"
services: 
  cloudbeaver:
      image: dalongrong/cloudbeaver:arthas
      build: ./
      volumes: 
      - "./demos:/opt/demos"
      ports: 
      - "80:8978"
      cap_add: 
      - ALL

使用

  • 啟動
docker-compose up -d
  • 進入容器生成火焰圖
docker-compose exec cloudbeaver sh
java -jar /opt/arthas/arthas-boot.jar
profiler start -i 200
  • 運行查詢

多點幾次

 

 

  • 停止生成火焰圖
 
profiler  stop

效果

 

 

 

 

  • 打開火焰圖

 

 


 

 

 

 

說明

基於以上我們打開可以了解一次代碼的處理,同時我們可以基於trace 、monitor、stack 、watch 等查看具體的處理,基於
arthas也是一個學習復雜系統的一個方法

參考資料

https://alibaba.github.io/arthas/en/docker.html
https://github.com/dbeaver/cloudbeaver
https://www.cnblogs.com/rongfengliang/p/12798154.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM