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