How to show request path In Istio metrics?

I have one workload where I want to be able to see the request path for requests going into the pod.
When I look in istio_requests_total{} prometheus metrics, I dont see any request path ie: /api etc…
Is there an easy way to do this in setting up a the virtual service or do I have to build a custom handler, instance, rule?
I dont necessarily need to see the request path for every request globally, just for one particular microservice.


There is some discussion going on now around exposing the in the telemetry. But it’s not yet available in the default requestcount metric. I’ve got some branches in kiali that can expose the info if you add to the telemetry, but you could also look at prometheus directly. To add it you can do the following if you’re installing via helm charts (note - this will not limit it to one workload, i don’t think that’s possible):

edit: install/kubernetes/helm/istio/charts/mixer/templates/config.yaml

add in the requestcount instance and also in the prometheus handler

then re-run the helm template.

oc project istio-system helm template _output/istio-1.3.0-rc.3/install/kubernetes/helm/istio | oc apply -f-

it may take a few minutes to propagate the change, but then I think you should be able to see request_host in istio_requests_total and hopefully it will provide the info you are looking for.