【发布时间】:2018-12-14 04:01:57
【问题描述】:
我目前正在尝试将我们的 prometheus 库迁移到 spring boot 2.0.3.RELEASE。
我们为 prometheus 使用自定义路径,到目前为止,我们使用解决方法来确保这一点。由于信息和健康端点可能有自定义路径,请使用management.endpoint.<health/info>.path。
我尝试指定management.endpoint.prometheus.path,但它仍然只能在/actuator/prometheus 下访问。
如何使用自定义路径或 prometheus?
我们使用以下库(我们的 build.gradle 的 sn-p)启用 prometheus
compile "org.springframework.boot:spring-boot-starter-actuator:2.0.3.RELEASE"
compile "io.micrometer:micrometer-core:2.0.5"
compile "io.micrometer:micrometer-registry-prometheus:2.0.5"
我们也使用PrometheusMetricsExportAutoConfiguration类的导入
非常感谢您的帮助 :)
【问题讨论】:
标签: spring-boot prometheus spring-boot-actuator micrometer