I have a metric that has the following name:
redis.outbound|6379||redisdb.my-redis.default.svc.cluster.local.command.hget.latency
I’m trying to have the Redis command as a label when I export the stats in prometheus format so I’ve annotated the pod template with the following annotations:
sidecar.istio.io/extraStatTags: command
The problem is that the generated /etc/istio/proxy/envoy-rev0.json
file in my sidecar ends up with the following stats_tags
configuration for the command
tag:
{
"regex": "(command=\\.=(.*?);\\.;)",
"tag_name": "command"
},
Clearly the generated regex won’t match my metric’s name and therefore won’t extract the command as a prometheus label.
So I’m wondering whether there is problem with the envoy template file here:
I feel that the generated regex should be like this: "({{ $tag }}\\.(.+?)\\.)"
Any thoughts?
I’m currently testing with Istio 1.5.0-beta4
Thanks,
JF