Monitor trace quota usage and spans ingested Stay organized with collections Save and categorize content based on your preferences.
You can create alerting policies in Cloud Monitoringto monitor the number of Cloud Trace spans ingested per month,your quota usage, and your rate of span ingestion. If you have never createdan alerting policy, seeManaging alerting policies fordetailed information about using the Cloud Monitoring console.
Monitor over-quota on Cloud Trace API usage
To create an alerting policy that triggers when your monthlyCloud Trace spans ingested exceeds your quota, use the following settings.
Steps to create an alerting policy.
To create an alerting policy, do the following:
In the Google Cloud console, go to thenotifications Alerting page:
If you use the search bar to find this page, then select the result whose subheading isMonitoring.
- If you haven't created your notification channels and if you want to be notified, then clickEdit Notification Channels and add your notification channels. Return to theAlerting page after you add your channels.
- From theAlerting page, selectCreate policy.
- To select the resource, metric, and filters, expand theSelect a metric menu and then use the values in theNew condition table:
- Optional: To limit the menu to relevant entries, enter the resource or metric name in the filter bar.
- Select aResource type. For example, selectVM instance.
- Select aMetric category. For example, selectinstance.
- Select aMetric. For example, selectCPU Utilization.
- SelectApply.
- ClickNext and then configure the alerting policy trigger. To complete these fields, use the values in theConfigure alert trigger table.
- ClickNext.
Optional: To add notifications to your alerting policy, clickNotification channels. In the dialog, select one or more notification channels from the menu, and then clickOK.
To be notified when incidents are openend and closed, checkNotify on incident closure. By default, notifications are sent only when incidents are openend.
- Optional: Update theIncident autoclose duration. This field determines when Monitoring closes incidents in the absence of metric data.
- Optional: ClickDocumentation, and then add any information that you want included in a notification message.
- ClickAlert name and enter a name for the alerting policy.
- ClickCreate Policy.
| New condition Field | Value |
|---|---|
| Resource and Metric | In theResources menu, selectConsumed API. In theMetric categories menu, selectApi. In theMetrics menu, selectRequest count. (The metric.type is serviceruntime.googleapis.com/api/request_count). |
| Filter | service = cloudtrace.googleapis.com |
| Across time series Time series aggregation | sum |
| Rolling window | 1 m |
| Rolling window function | sum |
| Configure alert trigger Field | Value |
|---|---|
| Condition type | Threshold |
| Alert trigger | Any time series violates |
| Threshold position | Above threshold |
| Threshold value | 0 |
| Retest window | 1 minute |
Monitor monthly span ingestion
To create an alerting policy that triggers when your monthlyCloud Trace spans ingested exceeds a user-defined limit, use the following settings.
Steps to create an alerting policy.
To create an alerting policy, do the following:
In the Google Cloud console, go to thenotifications Alerting page:
If you use the search bar to find this page, then select the result whose subheading isMonitoring.
- If you haven't created your notification channels and if you want to be notified, then clickEdit Notification Channels and add your notification channels. Return to theAlerting page after you add your channels.
- From theAlerting page, selectCreate policy.
- To select the resource, metric, and filters, expand theSelect a metric menu and then use the values in theNew condition table:
- Optional: To limit the menu to relevant entries, enter the resource or metric name in the filter bar.
- Select aResource type. For example, selectVM instance.
- Select aMetric category. For example, selectinstance.
- Select aMetric. For example, selectCPU Utilization.
- SelectApply.
- ClickNext and then configure the alerting policy trigger. To complete these fields, use the values in theConfigure alert trigger table.
- ClickNext.
Optional: To add notifications to your alerting policy, clickNotification channels. In the dialog, select one or more notification channels from the menu, and then clickOK.
To be notified when incidents are openend and closed, checkNotify on incident closure. By default, notifications are sent only when incidents are openend.
- Optional: Update theIncident autoclose duration. This field determines when Monitoring closes incidents in the absence of metric data.
- Optional: ClickDocumentation, and then add any information that you want included in a notification message.
- ClickAlert name and enter a name for the alerting policy.
- ClickCreate Policy.
| New condition Field | Value |
|---|---|
| Resource and Metric | In theResources menu, selectGlobal. In theMetric categories menu, selectBilling. In theMetrics menu, selectMonthly trace spans ingested. |
| Filter | |
| Across time series Time series aggregation | sum |
| Rolling window | 60 m |
| Rolling window function | max |
| Configure alert trigger Field | Value |
|---|---|
| Condition type | Threshold |
| Alert trigger | Any time series violates |
| Threshold position | Above threshold |
Threshold value | You determine the acceptable value. |
| Retest window | Minimum acceptable value is 30 minutes. |
Monitor rate of span ingestion
You can also monitor the rate at which spans are ingested. For this case,you want to select the metric typeTrace spans ingested. The defaultsettings in theTransform data andAcross time series sections areappropriate for this metric type.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.