How to Set Up Synthetic Monitoring in Checkly
Synthetic monitoring flips the detection model: instead of waiting for real users to encounter errors and report them, you proactively simulate user flows and API calls on a schedule, catching failures before they affect anyone. Checkly is purpose-built for this — it runs Playwright browser checks and API checks from global locations on configurable intervals, alerting your team when something breaks.
The difference between synthetic monitoring and traditional uptime monitoring is depth. A simple ping check tells you the server responds. A synthetic check tells you that a user can actually log in, navigate to the dashboard, and load their data. This guide walks through setting up Checkly to monitor both your API health and your critical user journeys end-to-end.
Step-by-step guide
Create your Checkly account and install the CLI
Sign up for Checkly and install the CLI with npm install -g checkly. Initialize a Checkly project in your repository with npx checkly init, which creates a __checks__/ directory and a checkly.config.ts file. The monitoring-as-code approach means your checks live alongside your application code, are version-controlled, and can be reviewed in pull requests just like any other code change.
- Install the Checkly CLI globally or as a dev dependency
- Run npx checkly init in your repository root
- Configure your account and API key in the CLI
Write API checks for your critical endpoints
Create API checks for your most important endpoints: the health check endpoint, the authentication endpoint, and the primary data-fetching endpoints your frontend depends on. Each check should validate the response status code, response time threshold, and a basic response body assertion. Set these to run every 5 minutes from at least 3 geographic locations relevant to your user base. API checks are lightweight and catch server-side issues quickly.
Create browser checks for critical user flows
Write Playwright-based browser checks that simulate your most important user flows. Start with login, then the primary action a user takes (e.g., create a document, submit a form, view a dashboard). Use Checkly's browser check template which provides a Playwright page object. Keep each check under 30 seconds of execution time and focus on the critical path — this is monitoring, not comprehensive testing.
- Write a login flow check that authenticates and verifies the dashboard loads
- Write a core action check that performs the primary user workflow
- Add assertions for key page elements, not just page load
Configure check locations and frequency
In your checkly.config.ts, set the default run locations to match your user distribution. If most users are in the US and Europe, run from us-east-1, us-west-1, and eu-west-1. Set API checks to run every 5 minutes and browser checks every 10-15 minutes (they are more expensive and slower). More locations and higher frequency give faster detection but cost more — start conservative and increase based on your SLA requirements.
Set up alerting channels and escalation
Configure alert channels in Checkly's dashboard: Slack for the engineering channel (immediate awareness), PagerDuty or Opsgenie for the on-call rotation (action required), and email for the engineering lead (async awareness). Set the alert threshold so checks must fail twice consecutively before triggering (this eliminates false positives from transient network issues). Configure recovery alerts so the team knows when an issue resolves.
Deploy checks via CI and monitor the dashboard
Add a step to your CI pipeline that deploys check definitions when they change using checkly deploy. This ensures that check updates go through code review. Set up the Checkly dashboard as a TV display in your team area or pin it in Slack. The dashboard shows check status across all locations with latency trends, making it easy to spot degradation before it becomes a full outage.
Common mistakes
Only monitoring the homepage or health endpoint
A health check returning 200 does not mean users can actually use the product. If your authentication service is down, database is slow, or a critical API returns errors, a health check still passes. Monitor the actual user flows that represent value delivery, not just infrastructure availability.
Setting alert thresholds too aggressively
Alerting on every single check failure creates alert fatigue. Network transients, temporary DNS issues, and CDN blips cause occasional failures that resolve immediately. Require 2-3 consecutive failures before alerting, and set appropriate latency thresholds (not the absolute minimum your server can achieve, but the maximum acceptable for user experience).
Using production credentials in check scripts
Synthetic checks that log in with real user credentials create security risk and pollute analytics data. Create dedicated monitoring accounts with limited permissions and exclude them from your analytics by user ID or email pattern. Store credentials in Checkly's environment variables, not in the check script.
Tips
Use Checkly's monitoring-as-code approach to store checks in your repository so they evolve with your application — when you change a user flow, update the corresponding check in the same PR.
Add performance assertions (page loads under 3 seconds, API responds under 500ms) to catch gradual performance degradation, not just outright failures.
Create a public status page powered by Checkly's status page feature so customers have transparency into your service health without needing to contact support.
Schedule a monthly review of check results to identify patterns: which endpoints have the highest failure rates, which locations show the most latency, and whether performance is trending in the right direction.
How Vantage helps
Vantage generates implementation tickets that can include monitoring requirements as acceptance criteria. When a PRD specifies uptime targets or performance SLAs, the generated tickets can require corresponding Checkly checks as part of the definition of done, ensuring monitoring coverage grows with feature development.