为什么 Spring 引导执行器有点分隔的普罗米修斯指标名称?
Why does Spring Boot actuator have dot separated prometheus metrics names?
我正在使用 Spring 带千分尺的引导,但似乎度量名称格式不正确。
Spring 引导版本 2.1.4.RELEASE
和 io.micrometer:micrometer-registry-prometheus:1.3.5
我从 http://localhost:8080/actuator/prometheus
获取指标
但是指标名称使用点而不是下划线。
当使用 promtool
进行 linting 时,我收到此错误消息 -
error while linting: text format parsing error in line 1: invalid metric name in comment
示例指标输出 -
# HELP tomcat.global.request.max
# TYPE tomcat.global.request.max gauge
tomcat.global.request.max{environment="development",host="local",name="http-nio-8080",service="mobile_backend",} 0.0
我不确定为什么会这样,或者我是如何将分隔符更改为下划线的。
确保您没有其他 NamingConvention
实施替代 PrometheusMeterRegistry
的原始 PrometheusNamingConvention
。
我正在使用 Spring 带千分尺的引导,但似乎度量名称格式不正确。
Spring 引导版本 2.1.4.RELEASE
和 io.micrometer:micrometer-registry-prometheus:1.3.5
我从 http://localhost:8080/actuator/prometheus
但是指标名称使用点而不是下划线。
当使用 promtool
进行 linting 时,我收到此错误消息 -
error while linting: text format parsing error in line 1: invalid metric name in comment
示例指标输出 -
# HELP tomcat.global.request.max
# TYPE tomcat.global.request.max gauge
tomcat.global.request.max{environment="development",host="local",name="http-nio-8080",service="mobile_backend",} 0.0
我不确定为什么会这样,或者我是如何将分隔符更改为下划线的。
确保您没有其他 NamingConvention
实施替代 PrometheusMeterRegistry
的原始 PrometheusNamingConvention
。