Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloudrun revision Request Latency and Request Count

Hello All,

iam trying to view performance metrics for a cloudrun service which built on java spring boot application. when i look at graphs on cloudrun sample dashboard it is not showing Request count and Request latency. anyone had similar issue.? please help me to fix this problem.

Solved Solved
0 10 2,952
1 ACCEPTED SOLUTION

What are you trying to deploy? Can you post an image of the metrics you are getting? And, are you using Google documentation to explore the metrics?

Here is some information that can be helpful with the metrics:

- https://cloud.google.com/run/docs/monitoring

- https://cloud.google.com/monitoring/api/metrics_gcp

- https://stackoverflow.com/questions/61756090/how-can-i-see-request-count-not-rate-for-a-google-cloud...

View solution in original post

10 REPLIES 10

iam trying to view performance metrics for a cloudrun service which built on java spring boot application. when i look at graphs on cloudrun sample dashboard it is not showing Request count and Request latency. anyone had similar issue.? please help me to fix this problem.

Is this the first time you are getting this situation with the dashboard?
If not, I suggest you review the Google Cloud Metrics documentation. Right there you will find a section of Metrics from managed Cloud Run, that might help you.

Also, here is a stackoverflow question with a similar situation you are facing, have in mind the first comment recommendation.

Hi, yes this is the first time we are having it.

Do you see something like this:

36LcVvP4pSznhk9.png

Are you looking at Metrics section in the https://pantheon.corp.google.com/run ?

Does it happen if you launch a test service using us-docker.pkg.dev/cloudrun/container/hello container image?

According to documentation the metric exclude requests that are not reaching your container instances. Can you check (e.g. using logs) that your service process the requests?

yes thats correct, it says "no data available for selected time period". for the hello image it shows the metrics.

Let's try to render out the mentioned possibility that requests are not reaching your container instances. Can you please confirm that you can see logs that your code sends to Cloud Logging or another logging backend?

In a case your code does not write any logs, would it be possible to modify the code to add this capability? The simplest way would be to print some information to STDOUT. The logging agent in Cloud Run will automatically capture all output that your application prints to STDOUT and will ingest it to Cloud Logging. You will be able to browse these logs using Log Explorer. Find your instance using the drop-down menus, select the resource Cloud Run Revision or type the following in the query editor area:

resource.type=cloud_run_revision AND resource.labels.service_name="SERVICE"

Just replace SERVICE with the name of your service. If you cannot see the logs, it means that the requests do not reach the instance that is running in Cloud Run. Otherwise, I would recommend to open a support ticket if you have Google Cloud Technical Support.

resource.type=cloud_run_revision AND resource.labels.service_name="test"
log_name="projects/prj-sample/logs/run.googleapis.com%2Fstdout"
 
i see lot of logs when i run above query that confirms requests are reaching to container and available logs in stdout. 

@vchava Thank you. In that case I can advise to reach out to Support. It seems that to resolve this case Tech Support Engineer will have to access your environment to see more details and to run tests. 🙁

If the container can operate independently and you can grant me an access to the container image, I could try to reproduce the problem in my environment. Unfortunately, I cannot do more beyond this.

@leoy  thank you for your time. sure we will proceed with Google support ticket for further research

What are you trying to deploy? Can you post an image of the metrics you are getting? And, are you using Google documentation to explore the metrics?

Here is some information that can be helpful with the metrics:

- https://cloud.google.com/run/docs/monitoring

- https://cloud.google.com/monitoring/api/metrics_gcp

- https://stackoverflow.com/questions/61756090/how-can-i-see-request-count-not-rate-for-a-google-cloud...