Introducing Runscope Live Traffic Alerts: Catch Failed & Exceptional API Transactions with Real-Time API Monitoring
Even the most well-written software with a comprehensive test suite is susceptible to seemingly random, intermittent failures and exceptions while running in production. If your software relies on or integrates with internal or external web service APIs, the possibility for encountering exceptions is compounded due to many factors beyond your control, such as poor network connectivity or the API itself being broken.
Many businesses, such as retailers, mobile app developers, media providers, data brokers and infrastructure providers, rely on APIs to meet the demands of their customers across a plethora of platforms—web, mobile and IoT to name a few. Poorly performing APIs have a significant impact on revenue, engagement and other success metrics, yet many of those API transactions occur only in the wild and cannot be simulated. Detecting API call failures and anomalies—like a credit card payment failing—is a vital component to a layered monitoring approach.
Runscope already offers a suite of tools that allow thousands of DevOps, QA and development teams to proactively monitor the APIs they rely on most. Today, we're excited to announce the addition of real-time API monitoring with Live Traffic Alerts. This unique combination of uptime monitoring and functional testing with real-traffic monitoring gives development teams a complete performance picture into mission-critical APIs throughout the entire API lifecycle.
Now Available: Runscope Live Traffic Alerts
Runscope Live Traffic Alerts logs live API traffic and notifies developers when key API transaction failures and exceptions are detected in near real-time. With Live Traffic Alerts, developers can detect specific API call failures that can only be observed in production, reducing time to resolution and minimizing lost revenue from breakages—all without ever having to write a single line of code.
These exceptional API calls include:
- Creating leads in a CRM platform
- Charging customer credit cards via payment APIs
- Facilitating marketplace transactions using a supplier's API
- Registering a new user to a database
Leveraging Live Traffic Alerts can help you not only discover hard API failures, but also more nuanced issues like intermittent or gradual increases in network performance degradation. Alerts can be configured to inspect and compare values within the response payload. For example, you can set an alert to monitor inventory or sales falling below a certain level.
Live Traffic Alerts allows you to:
- Generate notifications when important API calls fail (e.g. payment APIs)
- Keep tabs on slow endpoints
- Verify SLAs
- Catch erroneous API calls so that you can retry them
- Create custom performance dashboards
Get Started with Live Traffic Alerts
Setting up Live Traffic Alerts is simple. Sign in to your Runscope account (sign up here if you do not have an account), and navigate to Alerts at the top of the dashboard. In the animated screenshot below, we're creating an alert that detects failed API calls to our credit card payment provider.
You can add multiple rules per alert (up to 10). In the example above, we only examined the status code of the API response; however, rules can be based on the following sources of data with various comparison operators:
- Request (form and URL parameters, headers, body, URL)
- Response (headers, body, status code, response time, response size)
- Connection (source IP, destination IP, connection error, service region)
Collecting API Traffic
Live Traffic Alerts evaluate against all API calls stored in each respective Runscope bucket. API call traffic can be collected in your bucket via the following channels:
- Global Traffic Gateway (publicly accessible APIs)
- Gateway Agent (private APIs behind firewall or on VPC)
- Runscope API (messages resource)
- Request Captures (webhook calls)
- API Tests (each test request from tests in bucket)
In the next example, we use the Global Traffic Gateway (i.e. Gateway URL) method. For instance, if we wanted to collect and monitor API call traffic between our mobile app and a third-party API, we would just modify the original API's base URL to the transformed Runscope Gateway URL. The network overhead for passing through the Runscope Gateway URL is very low. Runscope leverages intelligent geo-based routing, sending the API call to the Runscope Service Region closest to your client application.
To generate a Runscope Gateway URL, click on the Create Gateway URL button from the Alerts menu. On the pop-up form, we'll type in the URL of the API we're calling from our app. Below that text field, a Gateway URL will appear, and that is the URL we'll use in our apps to make API calls.
When we enter a URL, it is transformed into a Runscope Gateway URL. Dots are transformed to dashes. The bucket key (unique identifier for our bucket) is appended along with the Runscope.net domain and path for the request. Using the Gateway URL Helper is not mandatory (you can construct Gateway URLs yourself by following the transformation rules).
As traffic is flowing into the bucket, when a failed payment API transaction is detected an alert is raised. Each subsequent 504 match will increase the match counter. When we Acknowledge the alert, the name of the acknowledger is logged, and the counter is reset. If we had any notifications configured (e.g. Slack, HipChat, Flowdock), alert notifications are sent on the 1st, 10th, 100th and 1,000th alert.
Start Monitoring Key API Transactions Today
We recommend that you begin by monitoring your key transactional APIs—those mission-critical calls that when they fail, can result in lost revenues or require extensive time to remediate (i.e. payments API, new user registrations, important transactional emails, etc.) For clarification, you can use the Global URL Gateway on any cloud accessible API, including third-party platforms—not just the services you own and operate.
Runscope Live Traffic Alerts is now available for all Medium and larger accounts, as well as those on the free trial. Sign up for Runscope today to get started using Live Traffic Alerts. If you're currently on a Free or Small plan, contact our Support team for a trial of Alerts. For more information, read the documentation or email firstname.lastname@example.org.
Free Webinar and Live Demo to Learn More
There is so much you can do with Live Traffic Alerts, and using Alerts in concert with the rest of the Runscope suite of API monitoring and testing tools provides a complete performance picture into your mission-critical APIs throughout the entire lifecycle. Learn more about how you can benefit from a layered monitoring approach that includes both proactive and real-time monitoring in our free live webinar on Thursday, October 29 at 10 a.m. PT. Reserve your spot, and if you can't make it, we'll send you the recording. For an in-depth look at Live Traffic Alerts, join us for a live demo of Live Traffic Alerts on Tuesday, November 3 at 10 a.m. PT.