This plugin is not compatible with Konnect
Contact 3rd party for support: This plugin is developed, tested, and maintained by Amberflo.io Inc.
This plugin allows you to understand customer API usage and implement usage-based price & billing by metering the requests with Amberflo.io.
It supports high-volume HTTP(S) usage without adding latency.
Amberflo is the simplest way to integrate metering into your application. Sign up for free to get started.
How it works
This plugin intercepts the requests, detects which customer is making it, generates a meter event and sends it to Amberflo.
Customer detection occurs via inspection of the request headers. You can configure Kong Gateway to inject the customerId
as a header before this plugin runs. For example, if you use the Key Authentication plugin, this occurs automatically.
To avoid impacting the performance of your gateway, the plugin batches the meter records and sends them asynchronously to Amberflo.
Installation
This is a server plugin implemented in Go. You only need to make the binary available to Kong Gateway:
GOBIN=/tmp go install github.com/amberflo/kong-plugin-amberflo@latest
mv /tmp/kong-plugin-amberflo /usr/local/bin/amberflo
Then, register the plugin in your kong.conf
file:
plugins = bundled,amberflo
pluginserver_names = amberflo
pluginserver_amberflo_start_cmd = /usr/local/bin/amberflo
pluginserver_amberflo_query_cmd = /usr/local/bin/amberflo -dump
Finally, restart Kong Gateway:
kong restart