Skip to content

What is the field attribute for log_to_metric transform ? #12120

Answered by jszwedko
midnightexigent asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @midnightexigent !

The field is the field of the event you want to operate on to generate the metric. In your example there, it is just incrementing the counter by 1, so it doesn't really matter which field you use (message is a good default). If you were generating a different metric type, like set, though, the value of the field would be used. See this example, https://vector.dev/docs/reference/configuration/transforms/log_to_metric/#examples-set, where the value of the field is added to the set metric that is generated.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@midnightexigent
Comment options

Answer selected by midnightexigent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #12118 on April 07, 2022 14:38.