【发布时间】:2020-12-30 00:12:02
【问题描述】:
使用 graphite 1.1.5 和 grafana,我尝试为标签的每个值显示计时器。我正在使用 微米 1.3.1。问题是我使用的全名存在,但没有标签。 石墨在 grafana 中的响应:
{
target: "xxx.tasks.duration.p99",
datapoints: Array...,
tags: {
name: "xxx.tasks.duration.p99"
},
title: "xxx.tasks.duration.p99"
}
我的 kotlin 应用中的代码:
Timer.builder("xxx.tasks.duration1")
.tag("type", taskType)
.register(metricsRegistry)
.record(toMeasureLambda)
所以看起来我的标签“类型”被忽略了。你有什么建议吗?如何按类型显示每个任务的执行时间?
【问题讨论】:
-
标签“type”的期望值是多少?
-
另外,代码中的计时器名为“xxx.tasks.duration1”,但石墨中的指标名为“xxx.tasks.duration”。这是问题中的错字吗?您是否在查看错误的石墨指标?
-
你能发布你的配置文件吗?您使用的是哪种协议?您确定您配置的 NamingConvention 是您需要的吗?
标签: kotlin grafana graphite micrometer