Set up quota monitoring and alerting

Over time, the usage of your app's API quota might grow because of increased use of your app's service. To maintain a good user experience, we recommend using Cloud Monitoring to observe your app's API quota usage and alert you when you're running out of quota.

To set up the quota monitoring process in Cloud Monitoring, complete the following steps:

  1. If necessary, create a Cloud Monitoring workspace for your existing project.
  2. In the side navigation area, select Resources > Metrics Explorer.
  3. In the Find resource type and metric box, enter "Consumed API" and select the Consumed API resource type.
  4. Also in the Find resource type and metric box, enter "" and select the Request count metric that appears.
  5. In the Filter box, enter "service=''".
  6. In the Group By box, enter "project_id" and select the project_id resource label.
  7. In the Aggregator drop-down list, select sum.
  8. If desired, you can use more advanced aggregation options to change the alignment period. This configuration step might be necessary in order to monitor the number of calls made per day to the SafetyNet Attestation API.
  9. Create custom dashboards and alerts. For more information, see the following guides: