Configuration
This plugin is compatible with DB-less mode.
The plugin is compatible with any with DB-less mode including local
, cluster
, and redis
Compatible protocols
The Moesif API Monetization and Analytics plugin is compatible with the following protocols:
http
, https
, tcp
, tls
, tls_passthrough
, udp
, grpc
, grpcs
Parameters
Here's a list of all the parameters which can be used in this plugin's configuration:
-
name or plugin
string requiredThe name of the plugin, in this case
kong-plugin-moesif
.- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
name
. - If using the KongPlugin object in Kubernetes, the field is
plugin
.
- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
-
instance_name
stringAn optional custom name to identify an instance of the plugin, for example
kong-plugin-moesif_my-service
.The instance name shows up in Kong Manager and in Konnect, so it's useful when running the same plugin in multiple contexts, for example, on multiple services. You can also use it to access a specific plugin instance via the Kong Admin API.
An instance name must be unique within the following context:
- Within a workspace for Kong Gateway Enterprise
- Within a control plane or control plane group for Konnect
- Globally for Kong Gateway (OSS)
-
service.name or service.id
stringThe name or ID of the service the plugin targets. Set one of these parameters if adding the plugin to a service through the top-level
/plugins
endpoint. Not required if using/services/{serviceName|Id}/plugins
. -
route.name or route.id
stringThe name or ID of the route the plugin targets. Set one of these parameters if adding the plugin to a route through the top-level
/plugins
endpoint. Not required if using/routes/{routeName|Id}/plugins
. -
consumer.name or consumer.id
stringThe name or ID of the consumer the plugin targets. Set one of these parameters if adding the plugin to a consumer through the top-level
/plugins
endpoint. Not required if using/consumers/{consumerName|Id}/plugins
. -
enabled
boolean default:true
Whether this plugin will be applied.
-
api_id
stringThe ID of the API the plugin targets.
Note: The API Entity is deprecated in favor of Services since CE 0.13.0 and EE 0.32. -
config
record required-
application_id
string requiredYour Moesif Application Id from your Moesif dashboard. Go to Bottom Left Menu -> Installation.
-
api_endpoint
string default:https://api.moesif.net
URL for the Moesif Collection API (Change to your secure proxy hostname if client-side encryption is used).
-
connect_timeout
number default:1000
Timeout in milliseconds when connecting to Moesif.
-
send_timeout
number default:2000
Timeout in milliseconds when sending data to Moesif.
-
timeout
number default:1000
(Deprecated) timeout in milliseconds when connecting/sending to Moesif.
-
keepalive
number default:5000
Value in milliseconds that defines for how long an idle connection will live before being closed.
-
api_version
string default:1.0
API Version you want to tag this request with in Moesif.
-
disable_capture_request_body
boolean default:false
Disable logging of request body.
-
disable_capture_response_body
boolean default:false
Disable logging of response body.
-
request_header_masks
map default:{}
An array of request header fields to mask.
-
request_query_masks
map default:{}
An array of query string parameter fields to mask.
-
request_body_masks
map default:{}
An array of request body fields to mask.
-
response_header_masks
map default:{}
An array of response header fields to mask.
-
response_body_masks
map default:{}
An array of response body fields to mask.
-
batch_size
number default:200
Maximum batch size when sending to Moesif.
-
user_id_header
string default:X-Consumer-Custom-Id
Request or response header used to identify the User in Moesif. See identifying users.
-
company_id_header
stringRequest or response header used to identify the Company (Account) in Moesif. See identifying companies.
-
authorization_header_name
string default:authorization
Request header containing a Bearer or basic token to extract user id. See identifying users. Also, supports a comma-separated string. The plugin will check headers in order “X-Api-Key, Authorization”. See identifying users.
-
authorization_user_id_field
string default:sub
Field name in JWT/OpenId token’s payload for identifying users. Only applicable if
authorization_header_name
is set and is a Bearer token. See identifying users.
-
authorization_company_id_field
stringField name in JWT/OpenId token’s payload for identifying companies. Only applicable if
authorization_header_name
is set and is a Bearer token. See identifying companies.
-
event_queue_size
number default:1000
Maximum number of events to hold in the queue before sending to Moesif. In case of network issues where the plugin is unable to connect or send an event to Moesif, skips adding new events to the queue to prevent memory overflow.
-
disable_gzip_payload_decompression
boolean default:false
If set to
true
, disables decompressing body in Kong.
-
disable_transaction_id
boolean default:false
Disable adding the
X-Moesif-Transaction-Id
response header for debugging.
-
max_callback_time_spent
number default:750
Limits the amount of time in milliseconds to send events to Moesif per worker cycle.
-
request_max_body_size_limit
number default:100000
Maximum request body size in bytes to log in Moesif.
-
response_max_body_size_limit
number default:100000
Maximum response body size in bytes to log in Moesif.
-
debug
boolean default:false
An option if set to true, prints internal log messages for debugging integration issues.
-