log_to_metric tags converted to lowercase #22589
-
Hi! I'm not sure if this is a bug, working as expected or simply bad configuration by my side. 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. type: "log_to_metric" inputs: - "inputstep" metrics: - type: "counter" ............ tags: "Aws_account_id": "xxxxxxxxxxx" "environment": "development" "*": "{{ tags }}" Log input: Metric output: Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @GGonzalezGomez, I verified this on my side. It boils down to this line: https://github.com/vectordotdev/vector/blame/6fe2317d0b1bbc477fafd9ff80f39de55d36dffc/src/common/expansion.rs#L28 Do you want to a feature request to preserve the case when expanding tags? Ideally that would be the default but it's preferred to not break existing behavior. |
Beta Was this translation helpful? Give feedback.
-
Hi @pront, that's ok, existing behavior is fine for me. It just looks a little bit random to convert it to lowercase, but probably there's a use case that makes sense for that. Thanks for checking! |
Beta Was this translation helpful? Give feedback.
Hi @GGonzalezGomez, I verified this on my side. It boils down to this line: https://github.com/vectordotdev/vector/blame/6fe2317d0b1bbc477fafd9ff80f39de55d36dffc/src/common/expansion.rs#L28
Do you want to a feature request to preserve the case when expanding tags? Ideally that would be the default but it's preferred to not break existing behavior.