tencent-cloud-cls
Attributes
NOTE: encrypt_fields = {"secret_key"}
is also defined in the schema, which means that the field will be stored encrypted in etcd. See encrypted storage fields.
This Plugin supports using batch processors to aggregate and process entries (logs/data) in a batch. This avoids the need for frequently submitting the data. The batch processor submits data every 5
seconds or when the data in the queue reaches . See for more information or setting your custom configuration.
Name | Type | Required | Default | Description |
---|---|---|---|---|
log_format | object | False | {“host”: “$host”, “@timestamp”: “$time_iso8601”, “client_ip”: “$remote_addr”} | Log format declared as key value pairs in JSON format. Values only support strings. or Nginx variables can be used by prefixing the string with $ . |
IMPORTANT
Configuring the Plugin metadata is global in scope. This means that it will take effect on all Routes and Services which use the tencent-cloud-cls
Plugin.
The example below shows how you can configure through the Admin API:
Enabling the Plugin
The example below shows how you can enable the Plugin on a specific Route:
Now, if you make a request to APISIX, it will be logged in your cls topic: