# Synthetic monitoring

What is synthetic monitoring?

Synthetic monitoring checks a website or application with traffic you generate yourself, from scheduled checks or scripts, instead of measuring what real visitors experience. It runs whether or not anyone is visiting, under conditions kept as consistent as possible, so one result can be compared with the next.

## How it works

MDN describes it as monitoring a page in a "laboratory" environment, with automation tooling, and names Lighthouse and WebPageTest as examples. In web performance the same split is lab data versus field data: web.dev defines lab data as a page loaded in a controlled environment with a predefined set of network and device conditions, and field data as measured from all users who visit, also known as [real user monitoring](/glossary/real-user-monitoring).

Checks range from a single request to a scripted path:

- A request to a URL on a schedule, as in [uptime monitoring](/glossary/uptime-monitoring), judged by its [HTTP status code](/glossary/http-status-code) and its response time.
- An audit of a full page load, such as [Lighthouse](/glossary/lighthouse).
- A script that follows the path a user might take through a web application, which MDN also counts.

What the Google SRE book calls black-box monitoring, testing externally visible behavior as a user would see it, covers checks like these.

## Why it matters

Because the conditions stay the same, a change in the result points at a change in the site, and MDN notes that this makes synthetic monitoring good for measuring the effect of code changes on performance. It also finds a broken site when no visitor is there to notice. In the SRE book's words, black-box monitoring shows that the system is not working correctly right now.

## What can go wrong

- A lab result is read as what users get. web.dev notes that a lab test uses a single device, a single network and a single location, usually with a cold cache, so field numbers often differ.
- A lab test cannot predict when users will interact, so it cannot measure [Interaction to Next Paint](/glossary/interaction-to-next-paint) accurately.
- A disk that is filling up passes every outside check until it breaks something; the SRE book calls black-box monitoring fairly useless for imminent problems.
- Only the home page is checked, while the pages behind it fail.

## Check it

Ranetrace's checks from outside are synthetic in this sense: [uptime monitoring](/features/uptime-monitoring) requests a site about every minute, [performance monitoring](/features/performance-monitoring) splits the response time of each check into phases, [Lighthouse monitoring](/features/lighthouse-monitoring) runs scheduled audits, and [certificate](/features/certificate-monitoring), [DNS](/features/dns-monitoring) and [broken link](/features/broken-link-monitoring) monitoring run their own checks. Ranetrace does not run scripted browser journeys.

Read this definition in a browser: https://ranetrace.com/glossary/synthetic-monitoring
