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:
- If necessary, create a Cloud Monitoring workspace for your existing project.
- In the side navigation area, select Resources > Metrics Explorer.
- In the Find resource type and metric box, enter "Consumed API" and select the Consumed API resource type.
- Also in the Find resource type and metric box, enter "serviceruntime.googleapis.com/api/request_count" and select the Request count metric that appears.
- In the Filter box, enter "service='androidcheck.googleapis.com'".
- In the Group By box, enter "project_id" and select the project_id resource label.
- In the Aggregator drop-down list, select sum.
- 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.
Create custom dashboards and alerts. For more information, see the following guides: