Alerts

Notifications are sent out to alert you whenever one or more of your performance budgets is crossed. We send alerts via email and to webhook endpoints like Slack. 

It's important to remember this only happens when the budget is crossed. For budgets with an absolute threshold that's either from under budget to over budget, or over budget to under budget. While for budgets with a rate of change threshold that's when the metric crosses from the no crossing status to over or under budget and likewise when the metric crosses back from over or under budget back to no crossing. If your test is over budget 10 times or hours in a row, we only send a notification on the first crossover. We don't send 10 notifications. This is done to reduce spam.

If you think you should be getting notifications but you're not, check the following:

  • Did the budget cross the threshold? Go to the budgets page and find your budget. Check the recent performance chart on the Budget details page. Notifications are only sent at the point at which the metric value crosses over or under the threshold.

  • Are notifications turned on? Open the budget details page for your budget. Check in the overview section of the page that Alerts are enabled.

  • Are you in the notification list? Open the budget details page for your budget and scroll down to the alerts section of the page. Check that your address or webhook is listed either in that section or in the Team alert preferences.

Slack

You can send performance budget alerts straight to your Slack channel.

  1. Search the Slack app directory for Incoming Webhooks and then click Add to Slack
  1. Choose the Slack channel you'd like the alerts sent to and click Add incoming Webhooks Integration.
  2. Copy the Webhook URL you're given by Slack. In your SpeedCurve settings add a new Webhook and paste in the Slack Webhook URL.
  3. For each performance budget, make sure that you have the "Send alerts for this budget" checkbox checked. You'll then get an alert in your Slack channel every time a performance budget alert is sent.

Microsoft Teams

You can send performance budget alerts straight to your Microsoft Teams channel.

  1. Search the app directory for Incoming Webhook and click on the matching result.
  1.  Click Add to a team.
  1. Select the channel that you want to receive the alerts and click Set up a connector
  1. Give the Incoming Webhook a name, optionally upload an image, and click Create.
  1.  Copy the URL that Microsoft Teams generates for the webhook.
  1. In your SpeedCurve settings, click Add Webhook and paste in the URL you just copied. Click Add to save the webhook.

Webhooks

SpeedCurve supports sending alerts to any webhook.

  1. In the Alerts section of your SpeedCurve settings, click the Add Webhook button and enter the URL of your webhook.

  2. For each performance budget, make sure that you have Send alerts for this budget checkbox checked.

That's it! Your webhook will receive a POST request for each performance budget alert.

Webhook payload details

Each performance budget alert will be sent as a separate payload to your webhook. The payload will be a HTTP POST request, where the request body is a JSON-encoded string. See below for the JSON schema.

 {
    // Information about the budget that is alerting
    "budget": {
        "metric": "SpeedIndex",
        "threshold": "1.8 seconds",
        "threshold_absolute": 1.8,
        "threshold_relative": 10
    },

    // Information about the chart that the budget is set on
    "chart": {
        "title": "Start Render, SpeedIndex | Wildly Inaccurate | Home | AVG",
        "chart_type": "timeseries",
        "metric": [
            "SYN|render",
            "SYN|speedindex"
        ],
        "correlation_metrics": [],
        "correlation_stat": null,
        "stat": "50",
        "site_ids": [
            "41774"
        ],
        "label": [
            "home"
        ],
        "region": [
            "all"
        ],
        "test_profile_name": [
            "all"
        ],
        "customer_data": []
    },

    // An array of crossing objects, each describing a data series
    // that crossed the budget threshold
    "crossings": [
        {
            // Whether the series went over or under the budget
            // threshold
            "type": "under",

            // The value of the threshold that this series crossed
            "threshold": 1.8,

            // The type of threshold that this series crossed
            // (absolute or relative)
            "threshold_type": "absolute",

            // Upper and lower bounds that were used for relative                // thresholds
            "threshold_lower": null,
            "threshold_upper": null,

            // By how much the threshold was crossed
            "difference_from_threshold": 0.36111111111111116,

            // The value in the series that triggered this alert
            "latest_value": "1.15",

            "series": {
                // The name that this series has in the chart
                "name": "SpeedIndex (Syn), BBC News, Home",

                // Information about the metric
                "metrictype": "time",
                "metricName": "SpeedIndex",
                "metricQualified": "SYN|speedindex",

                // An array of data points that were evaluated
                // against the budget
                "data": [
                    {
                        // A timestamp for this data point,
                        // expressed in milliseconds
                        "x": "1545658800000",

                        // The value of the metric at this point
                        "y": "1.12",

                        // For synthetic data, how many tests made
                        // up this data point
                        "num": "16",

                        // For synthetic median and 95th percentile
                        // queries, the test ID for this data point
                        "test": "181224_4Q_ab33515a52212727a28cd0cae080220c"
                    },
                    {
                        // More data points
                    },
                ]
            }
        }
    ],

    // A copy of the crossing object with the largest
    // difference_from_threshold value
    "largest_crossing": {
        // ...
    },

    // A URL to an image of the chart series at the time of
    // the alert
    "chart_image_url": "https:\/\/alerts.speedcurve.com\/n.php?hash=...",

    // A public ("share") URL to the Favorites dashboard containing
    // the chart
    "chart_web_url": "https:\/\/speedcurve.com\/my-account\/favorite\/...",

    // Used by some services like VictorOps
    "message_type": "INFO"
}

Interpreting performance budget alerts

Why am I receiving these alerts?

These alerts come from performance budgets in SpeedCurve. If you've only recently created a SpeedCurve account, then these alerts likely came from the default budgets that we set up for you. 

What do the alerts mean?

The alerts are to tell you when the performance of your web pages has gone over a predefined threshold, or changed significantly. Each alert contains one or more "budget crossings", which are charts and information about changes detected in your pages.

How do I turn off the alerts?

To turn off all performance budget alerts, you need to log into your SpeedCurve account and remove your email address from Settings > Alerts.

You can also disable alerts for specific budgets or charts:

  1. Find the budget you'd like to turn off alerting for in the Budgets section of SpeedCurve.

  2. Click on the Edit Budget button at the top-left of the page.

  3. Scroll down to the Alerts section in the Budget settings form and toggle Alerts to disabled.

  4. Click Save

What do the charts in the alert mean?

Each alert contains one or more "budget crossings". At a glance, you can see the following information for each crossing: 

  • The budget metric. Read about what the different metrics mean.

  • The name of the team that the budget belongs to.

  • The value of the budget threshold.

  • The current value of the metric, and how far above or below the threshold that value is.

  • A chart showing several days of historic data leading up to the budget crossing. Clicking on the chart will take you to the budget in SpeedCurve.

Why do some charts have a red threshold line where others have a green boundary?

All performance budgets have an absolute threshold. When a chart crosses this threshold, it is represented by a red line. Budgets can also have a relative threshold, which is represented by a green boundary. Read on to learn more.

Absolute thresholds

When you create a performance budget you set an absolute threshold. Alerts will be sent for this budget whenever the latest value for the metric crosses this threshold.

Alerts for absolute threshold crossings will include a chart similar to what you will see in your Site dashboard. The red line represents the value of the absolute threshold. Values over the threshold will be coloured red.

Rate of change thresholds

As well as the absolute threshold, you can also set a rate of change threshold or relative threshold for a budget. Alerts will be sent for this budget whenever the latest values for the metric are different to the previous values by the amount specified. See the [Rate of change thresholds and larger bucket sizes](doc:performance-budgets-and-alerts#Rate of change thresholds with a larger bucket size) for more information about how alerts are calculated for rate of change thresholds.