前言
使io.prometheus.simpleclient系列0.9.0包完成对java应用的监控,但由于该版本simpleclient_spring_boot使用的spring-boot1.5.4,并引用了其中的org.springframework.boot.actuate.endpoint包,该包在2.X版本中被大改,所以在springboot2.X应用中不适用。
prometheus下载安装
https://prometheus.io/docs/prometheus/latest/getting_started/ 官方文档
https://www.cnblogs.com/chenqionghe/p/10494868.html 翻译后的入门博客
https://github.com/prometheus/client_java simpleclient github地址
引入
<!-- prometheus -->
<!-- Hotspot JVM metrics-->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_hotspot</artifactId>
<version>0.9.0</ve