简体   繁体   English

用于对具有相同标签的指标进行分组的自定义名称

[英]Custom name for grouping metrics with same tags

My application based on spring-boot and I'm using micrometer with AWS cloudwatch for collecting specific metrics.我的应用程序基于 spring-boot,我正在使用带有 AWS cloudwatch 的千分尺来收集特定指标。 Faced an issue that it is hard to find needed metric if it has many additional tags, because of AWS naming metric groups (metrics with the same dimensions) by simple joining tags' names.面临一个问题,如果它有许多额外的标签,则很难找到所需的指标,因为 AWS 通过简单的连接标签名称来命名指标组(具有相同维度的指标)。

Here is an example:这是一个例子: 在此处输入图像描述

At the same time, for default aws services' metrics here present readable titles.同时,对于默认的 aws 服务指标,此处提供可读的标题。 在此处输入图像描述

Does anyone know how can I configure these titles?有谁知道如何配置这些标题? And can I configure them at all?我可以配置它们吗?

You can't configure that.你不能这样配置。 You'll see pretty labels on metrics publish by AWS services that integrate with CloudWatch in the background.您将在后台与 CloudWatch 集成的 AWS 服务发布的指标上看到漂亮的标签。

Custom metrics will have a top level namespace and then you'll have metrics grouped by different dimensions used (what you see in the screenshot).自定义指标将具有顶级命名空间,然后您将拥有按使用的不同维度分组的指标(您在屏幕截图中看到的内容)。

I'm not familiar with spring boot or micrometer, but if you have the ability to configure it, you could try some of these things:我不熟悉 spring 引导或千分尺,但如果你有能力配置它,你可以尝试以下一些事情:

  1. Split metrics into different namespaces (cache metrics for example could go into a separate namespace).将指标拆分到不同的命名空间(例如缓存指标可以 go 到单独的命名空间)。
  2. Remove some of the detail (do you need per instance metrics).删除一些细节(您是否需要每个实例的指标)。
  3. Move some dimensions into metric name (if you just want the info of the dimension value, but don't need the ability to aggregate and graph across that dimension, you can have it as part of the metric name).将一些维度移动到指标名称中(如果您只需要维度值的信息,但不需要跨该维度进行聚合和绘制图表的能力,您可以将其作为指标名称的一部分)。
  4. Use search to find the metric you need.使用搜索查找您需要的指标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM