I have an API deployed in GKE, exposed to internet through a Google endpoint.
when I display 'reponses latency' metrics of my API in GCP console: 'API & services' > 'Dashboard' > 'my-clint-eastwood-api' > 'metrics'
And I choose 'latency by response code (median)'. Fo the last hour I have a chart like this:
So a graph with four peaks above 6ms in last hour.
Now, I tried to obtain this same chart/measurement with the 'Metric explorer' in GCP console: 'Monitoring' > 'Metric explorer'.
I select these filters :
Resource Type : 'Produced API'
Metric : 'Request latencies'
Filter : 'service = my-clint-eastwood-api.endpoints.project-western.cloud.goog'
group by : empty field
Aggregator : 'mean'
Minimum alignment period : '1 minute'
The I obtain a chart of values for the last hour :
In same period, values are completely different comparing to values displayed in google endpoints metrics : almost all above 10ms there, against 3 peaks above 6 ms seen before.
Questions :
- why values are so different ?
- which chart is right, which is wrong ?
- How can we obtain correct chart displaying a mean of latencies in metrics explorer (in order to create dashboard afterwards) ?