Amberflo.io API Metering

Third Party
Related Documentation
Incompatible with
konnect
Compatible Protocols
http https
Third Party: This plugin is developed, tested, and maintained by Amberflo.io.

The Amberflo 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 requests, detects which customer is making them, 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.

Install the Amberflo plugin

This is a server plugin implemented in Go.

  1. To install the plugin, you 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
    
  2. 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
    
  3. Restart Kong Gateway:

    kong restart
    
Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!