log_to_metric tags converted to lowercase #22589
Unanswered
GGonzalezGomez
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm not sure if this is a bug, working as expected or simply bad configuration by my side.
I'm going through the log_to_metric transform which allows to set the metric labels/tags. According to documentation you can use "*" to add a log field map with tags. I've used it but for some reason the tag keys are converted to lower case. Only for those added with "*".
In the example below, I added the field tags which has a key named LogGroupName. On the metric tags that key is converted to lower case loggroupname. But, if I add a tag directly with upper case, Aws_account_id, it is left without changes.
Log input:
{"count":16.0,"dimensions":{"LogGroupName":"example-log-group"},"max":3.0,"metric_name":"IncomingLogEvents", "min":1.0,"namespace":"AWS/Logs","region":"eu-west-1","sum":20.0,"tags":{"LogGroupName":"example-log-group"},"timestamp":"2025-02-27T15:54:00Z","unit":"None"}
Metric output:
{"name":"incominglogevents_sum","tags":{"Aws_account_id":"xxxxxxxxxxx","environment":"development","loggroupname":"example-log-group"},"timestamp":"2025-02-27T15:54:00Z","kind":"absolute","counter":{"value":20.0}}
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions