I might be wrong but right now istio metrics shows up for a service on k8s but i need metrics for every rest endpoint. Example if my container exposes 2 services getBlah and getBlahBlah then i would like to see separate metrics for them . Is this possible ?
Do you mean to discriminate by path, like
If so, that wouldn’t be possible in Istio metrics as far as I know and in my opinion it’s probably not something likely to change because it would cause a problem of metrics cardinality (potentially way too many metrics would be produced).
However I can see two alternatives: using tracing, or using application-specific metrics. Tracing, while having its own constraints and being for slightly different purpose, has that kind of granularity. And app-specific metrics could also possibly provide that, although it depends on your technology stack and having these kind of metrics available in Prometheus format. As an example I would just point to the one I know quite well, this being with java’s vert.x toolbox: https://vertx.io/docs/vertx-micrometer-metrics/java/#_http_server
In 1.6 we will ship ability to customize istio standard metrics based on request property as an experimental feature. Please take a look at this preliminary doc: https://preliminary.istio.io/docs/tasks/observability/metrics/classify-metrics/
thanks @Pengyuan_Bian this is really cool. I am getting more greedy now, will this apply to egress to external endpoints too. Example i call some salesforce api and want to see metrics of salesforce endpoints