Creating alerting policies

Stay organized with collections Save and categorize content based on your preferences.

You can create alerting policies in Cloud Monitoring to monitor the number of Cloud Trace spans ingested per month, your quota usage, and your rate of span ingestion. If you have never created an alerting policy, see Managing alerting policies for detailed information on using the Cloud Monitoring console.

Trace over quota on API usage

To create an alerting policy that triggers when your monthly Cloud Trace spans ingested exceeds your quota, use the following settings.

New condition
Field

Value
Resource and Metric In the Resources menu, select Consumed API.
In the Metric categories menu, select Api.
In the Metrics menu, select Request count.

(The metric.type is serviceruntime.googleapis.com/api/request_count).
Filter service = cloudtrace.googleapis.com
response_code = 429
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

Trace monitor monthly span-usage

To create an alerting policy that triggers when your monthly Cloud Trace spans ingested exceeds a user-defined limit, use the following settings.

New condition
Field

Value
Resource and Metric In the Resources menu, select Global.
In the Metric categories menu, select Billing.
In the Metrics menu, select Monthly 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.