Just for curiosity purposes, I bypassed this limitation by adding an extra filter in the pipeline. Basically, I defined 3 conditionals based on the value of the field I wanted to set in metrics.
if "value1" in [custom_field] {
metrics{
.....
add_field => { "custom_field => "value1" }
}
} else if "value2" in [custom_field] {
metrics{
.....
add_field => { "custom_field => "value2" }
}
}
And then in a later step I process the event created by the metrics function. That did the trick for me.