Title: Support static tag-values, using a regex to match metrics in which it applies
Description:
I have a deployment in which I need to apply a fixed tag-value to a sub-set of Envoy metrics. The existing support for tagging metrics via StatsConfig.stats_tags is very close to what I need and I am curious if the Envoy project would consider expanding functionality here.
Specifically I would like to provide a configuration such as:
"status_config": {
"stats_tags": [
{
"tag_name": "some_foo",
"fixed_value_filtered": {
"value": "some_foo_value",
"match_regex": "^cluster"
}
},
{
"tag_name": "some_bar",
"fixed_value_filtered": {
"value": "some_bar_value",
"match_regex": "^http"
}
}
]
}
This would provide the tag some_foo=some_foo_value to all cluster* metrics and some_var=some_bar_value to all http* metrics.
Alternatively, the match_regex list could be inclusion_list with a type of type.matcher.v3.ListStringMatcher.
I imagine that this could be an additional option added to the oneof tag_value fields in order to avoid breaking backwards compatibility.
Thoughts? Also, if this is something that the envoy team is okay with, I can dedicate my time to putting together a PR.
Title: Support static tag-values, using a regex to match metrics in which it applies
Description:
I have a deployment in which I need to apply a fixed tag-value to a sub-set of Envoy metrics. The existing support for tagging metrics via
StatsConfig.stats_tagsis very close to what I need and I am curious if the Envoy project would consider expanding functionality here.Specifically I would like to provide a configuration such as:
This would provide the tag
some_foo=some_foo_valueto allcluster*metrics andsome_var=some_bar_valueto allhttp*metrics.Alternatively, the
match_regexlist could beinclusion_listwith a type oftype.matcher.v3.ListStringMatcher.I imagine that this could be an additional option added to the
oneof tag_valuefields in order to avoid breaking backwards compatibility.Thoughts? Also, if this is something that the envoy team is okay with, I can dedicate my time to putting together a PR.