Skip to content

Instantly share code, notes, and snippets.

@wjkoh
Last active June 21, 2025 07:34
Show Gist options
  • Save wjkoh/0bd85a7345b3245d6964cfc640818a45 to your computer and use it in GitHub Desktop.
Save wjkoh/0bd85a7345b3245d6964cfc640818a45 to your computer and use it in GitHub Desktop.
Google Cloud Run: Retrieve the total number of requests, not a rate, from Metrics Explorer

Check out this comment by Sanjeev Kumar or the following copy.

I was struggling as well to get the actual counts. In the current UI , there might be some issue with selecting resources (I was not able to do so). Hence I used PromQL language.

  1. Go to the metric explorer in monitoring.
  2. select promQL on right hand side.
  3. Enter this code: sum by (response_code_class)(run_googleapis_com:request_count{monitored_resource="cloud_run_revision"})

Give the dashboard some time to refresh and collect the data , Later you can see the request cumulatively adding up based on you selected filter on time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment