无法在 Spring Boot 2(版本 2.0.0.M7)项目中包含 Prometheus 指标。
根据千分尺文档 https://micrometer.io/docs/ref/spring/2.0#_prometheus added spring-boot-启动器-执行器依赖项并在 application.yaml 中添加management.endpoints.web.expose:普罗米修斯但打电话时/执行器/普罗米修斯 get
{
"timestamp": 1518159066052,
"path": "/actuator/prometheus",
"message": "Response status 404 with reason \"No matching handler\"",
"status": 404,
"error": "Not Found"
}
请告诉我为什么我没有得到普罗米修斯指标?
我在使用 Springboot 2.x 启动千分尺时遇到问题。
我的项目中的这些变化帮助我公开了指标actuator/prometheus
终点
这些是我的变化应用程序属性 file
management.endpoints.web.exposure.include=*
management.endpoint.metrics.enabled=true
My 构建.gradle包含文件
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('io.micrometer:micrometer-registry-prometheus')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)