Logs request and response data to Galileo, the analytics platform for monitoring, visualizing and inspecting API & microservice traffic.


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=galileo" \
    --data "config.service_token=YOUR_SERVICE_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.

form parameter default description
name The name of the plugin to use, in this case: galileo
The CONSUMER ID that this plugin configuration will target. This value can only be used if authentication has been enabled so that the system can identify the user making the request.
service_token The service token provided to you by Galileo.
Slug of your Galileo environment name. None by default.
false Capture and send request/response bodies.
10 Number of retries in case of failure to send data to Galileo.
30 Timeout in seconds before aborting a connection to Galileo.
2 Timeout in seconds before flushing the current data to Galileo in case of inactivity.
1000 Number of calls to trigger a flush of the buffered data to Galileo.
collector.galileo.mashape.com Host address of the Galileo collector.
443 Port of the Galileo collector.
true Use of HTTPs to connect with the Galileo collector.

How it works

When enabled, this plugin will create a buffer for each of the APIs it is monitoring. The buffer accumulates the logs of this API's traffic. When the API received no traffic for flush_timeout or if the number of calls reaches queue_size, the buffer is queued for sending to the Galileo collector.

The Galileo collector then processes your logs before you are able to see your traffic on your Galileo dashboard.

Logging bodies

This plugin can have a performance impact when the log_bodies option is enabled. Buffering the bodies is an expansive operation for Kong and depending on their size, can put pressure on the LuaJIT VM.

The buffer will only allow for bodies up to 20MB, and for up to 200MB of data queued for sending at once.

When logging bodies, make sure to configure your queue_size so that Kong flushes frequently enough to the Galileo collector.


Why can't I see my API logs on my Galileo dashboard?

First of all, check the Kong logs for errors at:


If you don't see anything useful, you can reload Kong with the debug log level by editing your configuration file:

error_log logs/error.log debug;

Now, you should see logs telling you what the plugin is doing, as well as responses from the Galileo collector. If the collector is able to process your data, it means Galileo is correctly receiving it. You'll want to make sure you have configured your plugin to send your data to the right environment.

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