Beat social media to the issue

Beat the tweet

6 minutes

A test that finds a problem nobody is told about is just a nicely formatted record of an outage. The thing that actually beats social media to the issue is the detector.

In the Introduction module we previewed a detector on run duration and closed it without saving. This time we are going to activate one.

Social media post about the shop being down

Alert on uptime, not on duration

Run duration is a good signal for slow. For broken, we use Uptime, because the uptime metric is 0 on a failed run and 100 on a successful one. That makes it the one metric that catches every kind of failure — a timeout, a failed assertion, a certificate problem, or the site being gone entirely — without us having to predict which.

Exercise Create and activate an uptime detector
  • On our test’s page, select .

  • Name it something that states the goal, for example:

    text
    [NAME OF WORKSHOP]-[YOUR INITIALS] checkout journey failing
  • Set the metric to Uptime.

  • In Alert details:

    SettingValueWhy
    Trigger threshold100Anything below a perfect run is a customer who could not buy
    OrientationBelowAlert when uptime drops
    Violates threshold1Fire on the first failure, so we see it during the workshop
    Split by locationNoWe are only running one or two locations
    Auto-clear alertsOnResolve automatically once runs stop reporting
  • Set the severity to Warning.

  • Leave Recipients empty.

  • Select .

Synthetics detector configured on the Uptime metric

Why no recipients?

All of us are building a detector against a shop that fails half its checkouts. With recipients attached, that is a lot of email for everyone. The alert still fires and is fully visible without one — we just read it in the UI instead of an inbox.

To see the notification itself, add only our own email address, and expect several messages.

Watch it fire

Exercise Find our alert
  • Go back to our test and select a couple of times until we get a failed run.
  • From the main menu, open Alerts & Detectors.
  • Find our detector by name and open the active alert.
  • Read what the alert tells us: which test failed, from which location, when, and against which threshold.

Tip

Alerts from Synthetics detectors support alert enrichment, so the notification itself can carry test context — which step failed and a link to the run — rather than just a metric name and a number, reducing time to investigate.

Four things we can scope a detector to

Currently our detector watches the uptime of the whole checkout test. When creating detectors, think about what is the most useful, actionable, and easy to understand, and change the scope accordingly.

Detector scopeAlerts onTypical use
Test-levelMetrics for the whole run: uptime, run count, run duration“Checkout is down” — what we just built
Page-levelMetrics for one page, scoped with page_position“The product page LCP broke our 2.5 s budget”
Transaction-levelDuration, requests, or size for one synthetic transaction“The Checkout transaction breached its 8 s SLA”
CA certificate-levelSSL certificate validity and expiry, on SSL tests“The storefront certificate expires in 30 days”

Because we named our transactions, we can alert on Duration scoped to transaction:Checkout and hold the checkout flow to its own SLA without the noise of the rest of the journey.

Quick check

Which scope do you use if you want to focus on the time it takes for the checkout portion of the user journey?

Synthetics detector configured on the transaction duration metric

In real life, reduce noise

Firing on a single failure is great in a workshop but not a good idea in real life. Fine tune the threshold, violation, and location split to get a manageable level of noise based on the estimated alert count.

Learn more in Detectors and alerts .

Last Modified ·

Report an issue