Synthetic monitoring setup guide: check types, intervals, false positives, scripts and trace correlation
What synthetic monitoring is and how it differs from RUM and uptime checks, which checks to build first, how to choose intervals and locations, how to avoid false alarms, and how to link a failed check to the backend trace.
Summary
- Synthetic monitoring runs scripted requests and user journeys against your application on a schedule, from defined locations, so you find broken logins, APIs and checkouts before customers do, even when nobody is using the site.
- Most false alarms disappear with three settings: a retry before a check counts as failed, confirmation from more than one location, and timeouts that match the step instead of one global value.
- Synthetic checks become far more useful when they send a W3C traceparent header, use dedicated test accounts and are excluded from analytics, so a failure leads straight to the backend trace and does not distort business data.
Synthetic monitoring means testing your application with scripted, artificial traffic: a robot calls your API, loads your login page, searches for a product or walks through the checkout, on a fixed schedule and from defined locations, and reports whether each step worked and how long it took. Because the traffic is generated by you, synthetic monitoring tells you that something is broken even at 3 a.m., when no real customer is there to notice, and it gives you a clean, repeatable baseline that does not depend on user devices or networks.
This guide is about setting it up properly. It covers how synthetic monitoring differs from real user monitoring and plain uptime checks, which check types to build first, how to choose intervals and locations, how to keep false positives low, how to handle test data and test accounts, how to keep synthetic traffic out of your analytics, how to maintain browser scripts, and how to connect a failed check to alerts, SLOs, traces and status pages. If you run a shop and want the broader picture of availability monitoring, start with our website monitoring guide for online shops; this article goes deeper into the synthetic part.
What is synthetic monitoring?
A synthetic check is a small test that runs against production (or staging) on a schedule. It has a target (a URL, hostname or script), a set of assertions (status code, response body, certificate validity, page element visible), a timeout, an interval and one or more locations from which it runs. Every run produces a result: pass or fail, the duration of each step, and diagnostic data such as response headers, a HAR file, a screenshot or the resolved IP address.
Synthetic transaction monitoring is the multi-step variant: instead of one request, the check performs a sequence that mirrors a business process, for example "open the homepage, log in, search for a product, add it to the cart, reach the payment page". If any step fails, you know which one, and you know that a real customer would have failed at the same point.
API monitoring is the same idea applied to machine interfaces: a check calls an endpoint with defined headers and payload, validates the status code, the latency and the shape or content of the JSON response, and can chain several calls, for example obtaining a token first and then calling a protected resource with it.
Synthetic monitoring vs. RUM vs. uptime checks
The three approaches answer different questions and complement each other. A plain uptime check is the simplest form of synthetic monitoring; real user monitoring is the opposite approach, measuring what actual visitors experience.
| Aspect | Uptime check | Synthetic transaction / API check | Real user monitoring (RUM) |
|---|---|---|---|
| Question answered | Is the endpoint reachable and responding? | Does a defined journey or API contract work end to end? | What do real users actually experience? |
| Traffic source | Generated, one request | Generated, scripted steps | Real browsers and apps |
| Works without visitors | Yes | Yes | No |
| Detects broken logic (e.g. empty search results) | Rarely | Yes, through assertions | Indirectly, through errors and drop-offs |
| Covers real devices, networks, browsers | No | No, only the configured ones | Yes |
| Typical use | Availability, SLA reporting, status page | Critical flows, release verification, third-party APIs | Core Web Vitals, errors by browser, real performance |
A practical rule: use synthetic checks to know that your critical paths work at all, and RUM to know how well they work for the people using them. Synthetic results are consistent and comparable over time; RUM data is representative but noisy and depends on traffic. Our glossary entry on black-box monitoring explains why testing from the outside catches problems that internal metrics miss.
Check types and what each one catches
Start with a small set of check types and add depth where the business impact is highest.
- HTTP and API checks. One or more requests with assertions on status code, response time, headers and body. Validate content, not only the status: a
200 OKthat returns an error page or an empty JSON array is still an outage for the user. For APIs, assert on key fields, for example thatitemsis a non-empty array or that aversionfield matches the expected release. - SSL/TLS certificate checks. Verify that the certificate is valid, matches the hostname, has a complete chain and does not expire within a warning window. Maximum lifetimes of publicly trusted certificates are being shortened in steps by the CA/Browser Forum, so automated renewal and an expiry check are both worth having. A warning 21 days before expiry and a critical alert 7 days before are common example values.
- DNS checks. Resolve the record from the check locations and compare it with the expected values (A/AAAA, CNAME, MX or NS records). This catches expired domains, accidental record changes, broken DNSSEC and propagation problems after a provider migration.
- TCP checks. Open a connection to a host and port and measure connect time. Useful for services that do not speak HTTP, such as an SMTP relay, an MQTT broker or a database endpoint that should be reachable from a private location.
- Browser checks. A real headless browser loads a page, executes JavaScript and asserts that elements are visible. Single-page applications often return
200for a shell that then fails to render; only a browser check sees that. - Multi-step browser transactions. Scripted journeys such as login, search, add to cart and checkout up to the payment step. They are the most valuable and the most expensive to maintain, so reserve them for the flows that make money or keep customers locked out when they break.
Also consider heartbeat monitoring for the opposite direction: batch jobs and cron tasks report in, and you are alerted when an expected signal does not arrive.
Choosing intervals and locations
The interval determines how quickly you detect a failure; the number of locations determines how confident you can be that a failure is real and not a local network issue. Both multiply cost and load, so set them by criticality rather than uniformly.
| Check | Interval (example value) | Locations (example value) |
|---|---|---|
| Homepage and critical API health endpoint | 1 minute | 3 to 5 regions |
| Login and checkout transaction | 5 minutes | 2 to 3 regions near your customers |
| Search, account pages, secondary APIs | 5 to 15 minutes | 2 regions |
| Third-party APIs you depend on (payment, shipping) | 5 minutes | 2 regions |
| SSL certificate expiry, DNS records | 1 hour to daily | 1 to 2 regions |
| Internal services and admin tools | 1 to 5 minutes | Private location inside your network |
Pick public locations where your users are. A shop selling mainly in Germany, Austria and Switzerland learns more from Frankfurt, Zurich and Vienna than from Sydney. Add one location in a different cloud provider or network so that an outage at a single provider does not look like your own outage. For services that are not reachable from the internet, run a private location: an agent inside your network or cluster that executes the same checks.
Remember that interval and confirmation together define your time to detect. A 5-minute interval with two required consecutive failures can mean up to roughly 10 minutes until an alert fires. If that is too slow for checkout, shorten the interval rather than removing the confirmation.
Avoiding false positives: retries, confirmation and timeouts
A synthetic check that cries wolf is worse than none, because the team learns to ignore it. Most false alarms come from transient network problems, a single unhealthy probe location, or timeouts that are too strict for the step. Three settings fix most of them.
- Retry before failing. Retry a failed run once, after a short delay, before it counts as a failure. One immediate retry is a common example value. Record that a retry was needed: a rising retry rate is an early warning in itself.
- Confirm from multiple locations. Alert only when the check fails from at least two locations (example value) within the same window, or from the majority of configured locations. A failure from one location only is worth a low-priority notification, not a page.
- Set timeouts per step. An API health call might get a 5-second timeout and a full checkout a 60-second timeout (example values). Separate "too slow" from "broken": assert on a latency threshold as a warning, and treat only real errors and hard timeouts as failures.
Further sources of noise are worth eliminating at the root:
- Bot protection and WAF rules. Web application firewalls, CAPTCHA services and rate limiters may block your own checks. Allowlist the check traffic by a dedicated header or source IP range, and make sure that allowlist does not become a bypass for attackers, for example by using a secret header value that you rotate.
- Cookie banners and pop-ups. Browser scripts that do not dismiss the consent banner fail on the first click. Handle the banner explicitly in the script, or pre-set the consent cookie.
- Maintenance windows. Mute checks during planned maintenance and deployments, ideally automatically from your deployment pipeline, so that expected failures do not wake anyone up.
- Brittle assertions. Asserting on exact text that marketing changes weekly produces failures that are not outages. Assert on stable elements and data attributes instead.
Our guide to reducing alert fatigue covers routing and deduplication patterns that also apply to synthetic alerts.
Test data and test accounts
Transaction checks need to log in, search and buy something, which raises practical questions about data.
- Dedicated test accounts. Create accounts used only by synthetic checks, one per journey or per location, so that parallel runs do not interfere (for example by emptying the same cart). Name them recognisably, such as
synthetic-checkout-fra@example.com. - Secrets management. Store passwords and API keys in the secret store of your monitoring tool or vault, never in the script source. Rotate them like any other credential and grant the accounts minimal permissions.
- MFA. If test accounts need MFA, use a TOTP secret stored as a secret and generate the code in the script, or use an allowlisted test path documented by your security team. Do not disable MFA globally for convenience.
- Side effects. Stop the checkout before the payment is captured, use the payment provider's test mode on staging, or use a test product and a flagged order that your order system cancels automatically. Make sure synthetic orders never reach fulfilment, invoicing or marketing emails.
- Stable test data. Search for a product that is guaranteed to exist and stay in stock. If the catalogue changes, the check should fail because search is broken, not because the product was removed.
- Clean-up. Delete or reset carts, wish lists and sessions at the end of a run, or schedule a clean-up job that removes data created by synthetic accounts.
Excluding synthetic traffic from analytics
Every check run is a page view, a session and, in a checkout journey, maybe an order. Without filtering, synthetic traffic inflates visit numbers, distorts conversion rates and can trigger personalisation or recommendation logic. Mark the traffic and filter it everywhere:
- Send a recognisable user agent suffix and a custom header, for example
X-Synthetic-Check: checkout-fra, on every request. - Filter on that marker, the test account IDs or the check source IPs in your web analytics. Most analytics tools offer filters for internal or test traffic by IP address or by a custom parameter.
- Tag the traffic in your own telemetry too. In RUM and traces, an attribute such as
synthetic=truelets you exclude checks from real-user dashboards and SLOs for real users, while still analysing them separately. - Exclude synthetic orders from business reporting and revenue metrics by flagging them in the order system.
If you track product events, the same tagging belongs in your event schema; see our article on website event tracking with RUM.
Maintaining browser scripts
Browser checks break more often because of changes to the page than because of outages. Treat scripts like test code: version them in Git, review changes, and run them in CI against staging before a release reaches production. Frameworks such as Playwright are commonly used for scripted browser checks because they provide auto-waiting, role- and test-ID-based locators and tracing. A simplified example of a login and search journey:
// example: synthetic login and search check (Playwright, TypeScript)
import { test, expect } from '@playwright/test';
test('login and search', async ({ page }) => {
await page.setExtraHTTPHeaders({ 'X-Synthetic-Check': 'login-search-fra' });
await page.goto('https://shop.example.com/login');
await page.getByTestId('cookie-accept').click();
await page.getByLabel('Email').fill(process.env.SYNTH_USER!);
await page.getByLabel('Password').fill(process.env.SYNTH_PASSWORD!);
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page.getByTestId('account-menu')).toBeVisible();
await page.getByRole('searchbox').fill('test-product-synthetic');
await page.keyboard.press('Enter');
await expect(page.getByTestId('search-result').first()).toBeVisible({ timeout: 10_000 });
});
A few rules keep scripts stable:
- Use stable selectors. Prefer dedicated attributes such as
data-testid, accessible roles and labels over CSS classes or deep XPath expressions that change with every redesign. Agree with the frontend team that test IDs are part of the contract. - Wait for state, not time. Wait for an element or a network response instead of fixed sleeps, which make checks both slower and flakier.
- One journey, one purpose. Short scripts with a clear purpose are easier to debug than one script that tests everything. Name steps so that the failure message reads like a sentence: "checkout: payment page did not load".
- Capture evidence. Keep screenshots, console errors, network logs and, if supported, a trace file for failed runs.
- Review after frontend releases. Make the check run part of the release pipeline so that a selector change fails in staging, not at night in production.
Alerting and on-call routing
Decide in advance who receives which synthetic alert and how urgently. A useful pattern is to map each check to a service owner and a severity:
- Page the on-call engineer when a critical journey (login, checkout, core API) fails from multiple locations after retries.
- Create a ticket for certificate expiry warnings, single-location failures and latency threshold breaches.
- Notify the owner of a third-party integration when an external API check fails, and link to the provider's status page.
Every alert should contain the failed step, the locations affected, the last successful run, a screenshot or response excerpt, and a link to the matching trace and runbook. Group alerts for the same root cause, for example when a DNS failure makes ten checks fail at once, so that responders receive one incident instead of ten pages.
SLOs based on synthetic checks
Synthetic results make a straightforward SLI: the share of successful check runs out of all runs within a window. For a checkout journey, an availability SLO could be "99.5 percent of checkout check runs succeed over 28 days" (example value), and a latency SLO could be "95 percent of runs complete the payment page step within 4 seconds" (example value).
- Count a run as failed only after retries and location confirmation, using the same logic as your alerts, so that SLO and alerting tell the same story.
- Remember that synthetic SLIs are samples: a 5-minute check produces 288 runs per day and per location. Short outages between runs are invisible, and one failed run is a large share of a small sample.
- Combine them with request-based SLIs from real traffic where you have it. Synthetic SLOs are most valuable for low-traffic periods, new features and flows where real traffic is too sparse to measure.
- Exclude planned maintenance windows explicitly and document that choice.
Error budgets and burn-rate alerts work the same way for synthetic SLIs as for request-based ones; our guide to SLOs in practice explains the alerting and release-gate side in detail.
Linking synthetic failures to traces
The most common frustration with synthetic monitoring is that it tells you that checkout is broken but not why. The fix is to make each check run part of a distributed trace. If the check sends a W3C Trace Context traceparent header, and your backend is instrumented with OpenTelemetry, the backend continues that trace. The trace ID of the failed run then leads straight to the spans, logs and errors of exactly that request.
# example: API check that injects a traceparent header
# format: version-trace_id(32 hex)-parent_id(16 hex)-flags
TRACE_ID=$(openssl rand -hex 16)
SPAN_ID=$(openssl rand -hex 8)
curl -sS -o /dev/null -w "%{http_code} %{time_total}\n" \
-H "traceparent: 00-${TRACE_ID}-${SPAN_ID}-01" \
-H "X-Synthetic-Check: api-orders-fra" \
https://api.example.com/v1/orders/health
echo "trace_id=${TRACE_ID}"
A few details matter:
- Set the sampled flag (
01) so that head-based samplers keep the trace, or make sure your tail-based sampling policy always keeps traces with errors or with the synthetic attribute. - Check that gateways, CDNs and load balancers forward the
traceparentheader. If they strip it, the trace starts at the first instrumented service and the link breaks. Our article on incomplete distributed traces covers propagation problems in detail. - Store the trace ID in the check result, so that the alert can link to it directly. Many synthetic tools that support OpenTelemetry do this automatically.
- For browser checks, the frontend instrumentation propagates trace context on fetch and XHR calls to your own APIs if it is configured to do so; restrict propagation to your own domains so that headers are not sent to third parties.
See the glossary entries on context propagation and trace IDs for the underlying concepts.
Status pages
Synthetic checks are a natural source for a public or internal status page, because they measure availability from the outside. Map each component on the status page to one or a few checks, but keep a human in the loop: automatically setting a component to "degraded" after confirmed failures is reasonable, while publishing an incident message should be a deliberate decision. Use the same confirmation logic as for alerts, otherwise a single flaky location turns your status page red. Report uptime per component over a stated window, and be explicit that the numbers are based on synthetic checks.
Frequently asked questions about synthetic monitoring
Do I still need synthetic monitoring if I have RUM?
Yes, for most teams. RUM only reports when real users are active and often misses the users who could not load the page at all. Synthetic checks run regardless of traffic and give you a controlled, comparable baseline.
Should synthetic checks run against production?
Yes for the critical journeys, with test accounts and safeguards against side effects. Running the same scripts against staging in CI catches script and application regressions before release.
How many checks should I start with?
Start with a handful: the main API health endpoint, the homepage, login, the most important transaction, certificate expiry and DNS for your main domains. Add more only when each new check has a clear owner and action.
What is the difference between API monitoring and API testing?
API testing usually runs once in a pipeline before a release; API monitoring runs the same kind of assertions continuously in production. Many teams reuse test collections as monitoring checks.
Synthetic monitoring setup checklist
Use this checklist when you set up or review your synthetic checks
- Critical journeys and APIs listed, each with an owner and a severity
- HTTP/API checks assert on status, latency and response content, not only on reachability
- SSL certificate expiry, hostname and chain checked with warning and critical windows
- DNS records of main domains compared with expected values
- TCP checks for non-HTTP dependencies, private locations for internal services
- Browser transactions for login, search and checkout, stopping before real payment
- Intervals and locations set by criticality and close to your users
- Retry before failure and confirmation from multiple locations configured
- Timeouts set per step; latency thresholds as warnings, not failures
- Check traffic allowlisted in WAF and bot protection, consent banner handled
- Dedicated test accounts with minimal rights, secrets in a secret store, test data that stays stable
- Synthetic traffic marked by header and attribute and excluded from analytics and business reports
- Scripts versioned, using stable selectors, run in CI against staging
- Alerts routed to owners with failed step, screenshot, trace link and runbook
- Maintenance windows muted automatically from the deployment pipeline
- Checks send a sampled
traceparentheader and store the trace ID - Synthetic SLIs and SLOs defined with the same failure logic as alerts
- Status page components mapped to confirmed check results
How Obseria helps with synthetic monitoring
Obseria brings synthetic monitoring together with traces, logs, metrics and real user monitoring in one OpenTelemetry-native platform. A failed check is not an isolated red dot: when the check propagates trace context, you can follow it into the backend trace and the related logs and errors.
- API, browser and transaction checks feed SLOs, alerting and incident management, with routing to the right owner.
- Status pages can reflect confirmed check results, and real user monitoring shows how the same journeys perform for real visitors.
- Obseria Intelligence correlates a failing check with deployments, infrastructure changes and backend errors, and presents the evidence for its root cause analysis.
Pricing is usage-based per signal with unlimited users, see pricing. To see synthetic checks linked to traces in your own setup, book a demo or start the 14-day free trial.