To involve developers in monitoring, you need to make it easy
Most engineering organizations are shifting their monitoring and observability left, making developers part of the team that makes sure their service is always running and available. But we don’t expect our developers to become QA and Operations experts, so we need to enable their contributions with as much automation and default configuration as possible. The goal of this guide is to help create an easy process for all your engineers to contribute to monitoring. Just like any Checkly user, developers can still control every aspect of how a monitor runs, when it detects failure, and who gets notified of that failure. This isn’t about taking away control, just setting defaults and automation so that you don’t need to become a monitoring expert to contribute to your team’s monitoring. This guide will tie together material from our Playwright Learn articles, our blog, and our tutorial videos, to help you create an environment for developers that makes it easy for them to add new page checks with minimal repetitive code. We’ll cover:- The Checkly CLI and Monitoring as Code for developers
- Creating standardized configuration for checks and groups of checks
- Automating repeated tasks like account logins so the code can be re-used in multiple checks
- Adding standardized code that runs with every check
Whom this guide can help
This article will refer repeatedly to an ideal “developer” who understands their own service quite well, but isn’t experienced at either QA or monitoring. They may not be an expert in the automation framework Playwright, which we use to write our monitors, and they don’t have experience with specific configuration like retry logic, alert thresholds, etcetera. This guide can also help you make monitoring accessible for:- Front-end developers who work on the user experience, but haven’t previously monitored the site in Production
- Integration engineers who want to make sure that changes to third-party services don’t break your site
- User Experience engineers who want to make sure everything works as expected for all users
The Checkly CLI and Monitoring as Code for developers
First off, our developer may not be very excited to log into a web interface to create new monitors. Since developers are used to running and deploying code from the command line, we want to make available the Checkly CLI to our developers. A full guide to the Checkly CLI is on our documentation site, but in general the process would look like:- Set up the CLI on the developer’s machine - install is easy with npm, then the developer can authenticate their cli with
npx checkly login
. - Create a new project - developers can either grab an existing repository with the team’s checks, or use
npm create checkly@latest
to make a new project. - Run your checks - rather than running new Playwright checks from the developer’s laptop, they can run checks through the whole Checkly system with
npx checkly test
, the tool will scan the project for tests, run them as configured from the real geographic locations, and give a local report on results. - Deploy your checks - Once the developer is happy with their checks, they can deploy them with
npx checkly deploy
, and they’ll show up for all users in the web interface.
Grouping Checks and Standardizing Configuration
It’s a great feature of Checkly that any check can have totally custom settings for every aspect of its running: it can run at a custom cadence, from its own geography, with its own logic for retries. This means that if, for example, you’re creating a new test specifically to check localization settings, you can set just that check to run from dozens of geographies, even if most checks only need three or four. Of course, we don’t want to give our fresh developer over a dozen settings that she needs to set just to create her first check. New Checks created either in the web UI or from your code environment via the CLI will default to using the global configuration. You can view and edit this global config incheckly.config.ts
, you can see a reference on this configuration and options under the project
construct documentation. Some suggestions for default configuration:
-
Set a generous
RetryStrategy
! Some failures can look extremely worrying even if they happen once, but it’s worth double-checking that the problem wasn’t entirely ephemeral. Full documentation of retry configuration is on our docs site. - If you’re encouraging microservice developers or frontend engineers to add checks, consider setting the default frequency to be relatively low. It’s great to test edge cases or unusual scenarios, but someone without exposure to Operations is unlikely to need to run a check every minute.
-
Make sure your geographic
locations
reflect your userbase. You can userunParallel:false
if testing from a large number of locations, so that checks will run from a single location each cycle.
Check Groups and Alert Policies
You may want to go beyond global settings for a larger or more complex team. For example if a group of engineers is working with:- Different notification expectations
- Different URL’s and other check variables
- A specific set of features in your application
checkGroup
object to the config), or in the web UI by creating a group and clicking ‘Add Checks to Group’.

- Alerts go to the groups alert channels, so be sure your group is connected to at least one alert channel or you will miss any notifications from this group!
- Checks in the group are run individually, not as a group. If you’re thinking of doing something like a post-run cleanup with a single check for the whole group, that won’t work as expected, instead run cleanup scripts individually for each check.
- For API checks, you can have a ‘teardown script’ for a group that runs after every check is completed.
- That said, all the checks in a group can be triggered to run at the same time, this is especially useful if a group is used to run checks after deployments.

- Any settings that are given in two places will be reconciled with the following hierarchy:
- individual settings on a check
- group settings
- global settings
- While groups are a useful feature of Checkly, and will make sense for some applications, you may also be served by using Javascript and Typescript’s native features for inheritance. Since files can inherit modules from others, it’s possible to share configuration very cleanly, is as complex a heirarchy as you’d like, using these native features. This especially may make sense if you’re going deep into Monitoring as Code and want to set up a complex repository for all monitoring. Native features also help support the next section on using fixtures to share code blocks.
Sharing code for repeated tasks
While there are sophisticated ways to share authentication across checks discussed in other guides, it’s good to know how to share code with fixtures for common repeated tasks. Let’s imagine an example where we’ve got a web shop with a login modal that we need to fill out before doing further account actions. The goal of my check isn’t really to test this modal, it just needs to be filled out before my real testing, where I look at my demo user’s recent orders:
RecentOrders.test.ts
RecentOrdersWithFixture.test.ts
See it in action: Reuse Playwright Code across Files and Tests with Fixtures
To see fixtures demonstrated, and a step-by-step explanation of the code, check out Stefan’s tutorial video:Running standardized code across every check
While it’s useful to package up tasks like logging in across multiple tests, we may want some code to run before and after every single check. Some possible examples:- We know that every session has to set the same page settings every time (like cookie settings)
- Manually cleaning up any test’s actions - for example restoring our demo user’s account settings
EcommerceActions.test.ts
TestFixtures.ts
test
function from this fixture file, for example:
EcommerceActions.test.ts