【问题标题】:Tags in graphite using micrometer are not send不发送使用千分尺的石墨标签
【发布时间】: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


【解决方案1】:

您可以调试GraphiteReporter 并检查使用了哪个GraphiteSender。之后,检查发送 GraphiteSender 的内容。 90% 的问题都存在。

如果您使用的是 Statsd,问题会有所不同。 您可以将线路接收器重定向到 System.out,以便检查来自应用程序的内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-10
    • 2016-01-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多