Creating alerting policies

You can create alerting policies in Stackdriver Monitoring to monitor the number of Stackdriver 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 Stackdriver Monitoring console.

Creating a monthly span-usage alert

You can alert on your Trace usage in the same way you alert on other kinds of usage in Stackdriver. For details, go to Alerting on Stackdriver usage.

Creating an over-quota alert

The over-quota alert described in this section monitors resource exhausted error responses for your Stackdriver Trace API calls. When you have exceeded your daily spans ingested quota and when you have exceeded your API rate quota, your API calls will fail with resource exhausted errors. The HTTP response code for this error is 429.

To create an over-quota alerting policy, do the following:

  1. Go to Monitoring:

    Go to Monitoring

  2. From Alerting, select Create a Policy.

  3. Click Add Condition.

  4. Select Consumed API for the resource type and Request Count for the metric.

  5. Add the filter service = and the filter response_code = 429:

    Select service and the response code filter.

  6. Aggregate your individual time series into a single time series:

    • Set the Aligner field to sum.
    • Set the Reducer field to sum.
  7. Set the Configuration fields and then select Save.

    For example, if you want to be notified that a resource exhausted error response was received in a one minute interval, set the Configuration to trigger if any time series is above zero for one minute:

    Set configuration to trigger if above a threshold.

    You can alter the measurement interval or the number of responses received according to your needs.

  8. Complete the alerting policy by filling in the Notification, Documentation and Name sections, and then selecting Save. For details, go to Creating an alerting policy.

Was this page helpful? Let us know how we did:

Send feedback about...

Stackdriver Trace
Need help? Visit our support page.