Logs request and response data to Runscope. Using the Runscope Traffic Inspector, each API call can be fully viewed in it's entirety. All traffic can be searched by keyword (headers and bodies are indexed) and attribute (i.e. status code, response size, response time, etc.). Using Runscope Live Traffic Alerts, API failures and exceptions can be caught, notifying your team about problems before your customers find out. Trigger alerts based on any part of the HTTP request or response, including header values, JSON or XML data, connection details and more. Alerts can be sent to Slack, HipChat, PagerDuty, email, or webhook notifications. Live Traffic Alerts is available on all medium and larger plans.

How it works

This plugin sends API traffic data to your Runscope bucket using the Runscope API.

It is important to be aware of performance when configuring this plugin. For example, be aware that logging the request and response bodies might slow down your traffic if your API is under heavy load. If your API works with significantly large request or response bodies, consider turning off this feature by updating the log_body configuration.


Configuring the plugin is straightforward, you can add it on top of an API (or Consumer) by executing the following request on your Kong server:

$ curl -X POST http://kong:8001/apis/{api}/plugins/ \
    --data "name=runscope" \
    --data "config.bucket_key=YOUR_BUCKET_KEY" \
    --data "config.access_token=YOUR_ACCESS_TOKEN"

api: The id or name of the API that this plugin configuration will target

You can also apply it for every API using the http://kong:8001/plugins/ endpoint. Read the Plugin Reference for more information.

parameter default description
name The name of the plugin to use, in this case: runscope
config.access_token The Runscope access token (or personal access token) for the Runscope API.
config.bucket_key Your Runscope bucket ID where traffic data will be stored.
false Whether or not the request and response bodies should be sent to Runscope.
https://api.runscope.com URL for the Runscope API.
10000 An optional timeout in milliseconds when sending data to Runscope.
30 An optional value in milliseconds that defines for how long an idle connection will live before being closed.

Kong Process Errors

This logging plugin will only log HTTP request and response data. If you are looking for the Kong process error file (which is the nginx error file), then you can find it at the following path: {prefix}/logs/error.log

Keep up with the latest features