Contents ▼

Recording Monitors

Some APIs are meant to be hit from a web browser, such as those that serve as the backend of a Single Page Web Application (SPA).

If you are responsible for such an API, you can save time on monitor creation by recording traffic with Speedway's free browser extension! Recording browser traffic while you use your site can save you the chore of manually creating monitor steps to hit each of your endpoints. Recording is especially helpful if your application has complex flows with multiple API calls one after another.

Installing the Loadster Recorder Browser Extension

The browser extension is called Loadster Recorder and is available for the Chrome and Firefox browsers.

The extension is called Loadster Recorder because Loadster is Speedway's companion app for load testing all sorts of HTTP websites, web applications, and APIs. The browser extension was originally created for Loadster, but it now supports recording for both Loadster and Speedway.

To install this free extension, go to the extension page for your browser, and install it the way you would any other browser extension.

This extension is open source and you can review the source code on GitHub.

Recording Monitor Steps

After creating or editing a monitor, edit the steps as if you were going to add them manually. Then hit the Record button.

As soon as you start recording, Speedway will immediately try to communicate with the browser extension. If found, it will prompt you to open a new browser tab with the starting URL of the site or application you want to record traffic for. Only activity in this browser tab will be recorded by the extension.

Navigate the site you are recording as a user normally would. Speedway will record your browser activity as a series of HTTP requests. When finished, stop the recording or close the browser tab containing the site you are recording.

Filtering Monitor Steps

After you finish a recording, Speedway presents you with all the browser traffic it recorded, broken down by domain and content type. You can select and deselect the domains and content types you want to include in the recording.

It's often necessary to filter out any 3rd party content, ads, static content, or any other content that you don't want to monitor. Some sites have a huge number of them. If your API listens on a specific domain separate from static content, this should be easy: simply check the domain that hosts your API and uncheck all the others.

When you complete the recording, Speedway turns the recorded browser traffic into HTTP Steps.

Recording Pitfalls

Many API operations are dynamic: each time you call them, they may expect different parameters or return different values.

Simply recording API traffic and playing it back verbatim might not do the trick. After recording, we recommend editing the monitor steps that were recorded. You might want to add validation, capturing, and unique data submission.

It's best to use recording as a starting point for monitoring browser-facing APIs, but don't use “record and playback” as a naive end-to-end monitoring approach.