简体   繁体   English

DataDog 标签值是否转换为带下划线的小写?

[英]Is DataDog tag value converted to lower case with underscores?

I push a custom tag to DataDog with key of execute_error and value of "testing DATADOG mApPeR OK"我使用execute_error的键和"testing DATADOG mApPeR OK"的值将自定义标签推送到 DataDog

However, when I check on the DataDog, it looks like the tag is mapped into "execute_error:testing_datadog_mapper_ok" .但是,当我检查 DataDog 时,标签似乎已映射"execute_error:testing_datadog_mapper_ok"中。

I expect a "execute_error:testing DATADOG mApPeR OK" .我期待一个"execute_error:testing DATADOG mApPeR OK"

Is this a feature by DataDog?这是 DataDog 的功能吗?

I have read the docs, but can't find relevant info about this.我已阅读文档,但找不到相关信息。

One thing that I have found is that DataDog maps the tag key as written in Getting Started with Tags (I am still unsure whether they do the same for the tag value).我发现的一件事是 DataDog 映射标签键,如标签入门中所写(我仍然不确定他们是否对标签值做同样的事情)。

Thank you.谢谢你。

PS.附言。 Sorry I can't attach screenshot due to reputation抱歉,由于声誉原因我无法附上屏幕截图

You are correct that datadog will convert tags to lower case, in the doc you linked there is a note:您是正确的,datadog 会将标签转换为小写,在您链接的文档中有一条注释:

Tags are converted to lowercase.标签被转换为小写。 Therefore, CamelCase tags are not recommended.因此,不推荐使用 CamelCase 标签。 Authentication (crawler) based integrations convert camel case tags to underscores, for example TestTag –> test_tag基于身份验证(爬虫)的集成将驼峰式标记转换为下划线,例如TestTag –> test_tag

https://docs.datadoghq.com/getting_started/tagging/ https://docs.datadoghq.com/getting_started/tagging/

The notes about crawler based integrations is mostly referring to Cloudwatch metrics from AWS with tend to like camelcase, so there's some special logic to convert those tags in datadog.关于基于爬虫的集成的注释主要是指来自 AWS 的 Cloudwatch 指标,倾向于喜欢驼峰式大小写,因此有一些特殊的逻辑可以在 datadog 中转换这些标签。

There is also a note about which characters are valid for making tags:还有一条关于哪些字符对制作标签有效的说明:

Tags must start with a letter and after that may contain the characters listed below:标签必须以字母开头,之后可能包含下列字符:

  • Alphanumerics字母数字
  • Underscores下划线
  • Minuses缺点
  • Colons冒号
  • Periods经期
  • Slashes斜杠
  • Other special characters are converted to underscores.其他特殊字符将转换为下划线。

Spaces are not in that list and are considered special characters that get converted to _ .空格不在该列表中,被视为转换为_的特殊字符。

The docs are saying "tags" in both these notes, not just the key, but the full key:value pair.文档在这两个注释中都说“标签”,不仅仅是键,还有完整的键:值对。

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

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