Cannot add metric based on request / response other than `istio_requests_total`


I’ve followed this article here

That allows to classify metrics based on response or requests.

The article uses the istio_requests_total metric.

Whenever I try to use another standard metric ( - in this case istio_request_duration_milliseconds - I do NOT get the additional label on the prometheus metrics.

Only the istio_requests_total seems to be working.

My usecase is that I have multiple OpenAPI endpoints. For exaple, /bla/bli/123/snipper with operationId = myBlas. I’d like to see the istio_requests_total and istio_request_duration_milliseconds for that specific operation. It works with istio_requests_total, but not other metrics. Please help!

Maybe try to omit metric name from the customization? it should apply it to all metrics at the same time.

For real? I’ll try that.