Runscope API Testing and Monitoring    Learn More →

Runscope Heroku Add-on Now Available

By John Sheehan on .

heroku.png

 Starting today, the Runscope Heroku Add-on moves from beta to general availability, making it available to all Heroku apps.

As part of the updated release, we've added the ability to upgrade your account to the Starter plan to take advantage of the higher usage limits and multiple service regions . If you read the beta announcement, the rest of this post will look familiar. If you're new to using Runscope with your Heroku apps, read on to learn more about how it works.

Installing the Add-on

Provisioning the add-on for your app is a simple call from the command line using the Heroku Toolbelt:

$ heroku addons:add runscope

Once provisioned, your app will now have a RUNSCOPE_BUCKET_KEY configuration variable set. Each of your apps gets its own unique bucket key. You can then use these keys in your app to start capturing API traffic.

If you run out of requests (each Heroku app gets 2,500/month) or want to use Service Regions, upgrade to the Starter plan with the following command. All billing will be handled through your Heroku account.

$ heroku addons:upgrade runscope:starter

Capturing your First API Call

With your bucket key in hand you can now make requests using Runscope URLs. Here's an example of using a Runscope URL in a Node.js app using the request module: 

// BEFORE        
var request = require('request');
request.post('https://api.yourapihere.com/post', function (error, response, body) {
if (!error && response.statusCode == 200) {
// ...
}
});

// AFTER - USING RUNSCOPE URL
var request = require('request');
request.post('https://api-yourapihere-com-bucket_key.runscope.net/post', function (error, response, body) {
if (!error && response.statusCode == 200) {
// ...
}
});

For more examples check out the Runscope Guide in the Heroku Dev Center or our own Developer Guide

Accessing the Dashboard

The Runscope Dashboard allows you to view the traffic you’ve sent through Runscope, execute HTTP requests from your browser, and create a publicly-available links that you can share with other people to view the data in a request and response. Access the Dashboard from the 'Resources' view for your app in the Heroku web app.

That's all there is to it! If you run into any issues, feel free to email us any time

Categories: announcements, integrations

Everything is going to be 200 OK®