【发布时间】:2022-01-26 16:35:17
【问题描述】:
我目前有一个 spring boot 2.4.0 项目,它使用 /metrics/custom-timer 公开指标,我创建了一个自定义计时器,但它只给出了一些值而不是百分位数。
"name": "custom-timer",
"description": null,
"base_unit": "seconds",
"measurements": [
{
"statistic": "COUNT",
"value": 1000.0
},
{
"statistic": "TOTAL_TIME",
"value": 100000.0
},
{
"statistic": "MAX",
"value": 100.0
}
],
"available_tags": []
}
我启动了自定义计时器
summary = Timer.builder("custom-timer")
.publishPercentileHistogram(true)
.publishPercentiles(0.3, 0.5, 0.95)
.register(Metrics.globalRegistry);
如何获取指标端点中的百分位数?
【问题讨论】:
标签: java spring spring-boot micrometer