

{"tries":"[{\\"balancer_latency\\":0,\\"port\\":80,\\"balancer_start\\":1654569xxxxxx,\\"ip\\":\\"172.0.0.2\\"}]","upstream_uri":"/10k","querystring":"{}","req_url":"http://172.0.0.3/test","latency_kong":"1","req_method":"GET","resp_headers":"{\\"x-kong-upstream-latency\\":\\"2\\",\\"date\\":\\"Tue, 07 Jun 2022 02:34:15 GMT\\"}","req_uri":"/test","resp_status":"200","request_time":"3","req_body":"","resp_body":"some response body","latency_proxy":"2","req_headers":"{\\"host\\":\\"172.16.0.37\\"}","started_at":"1654569xxxxxx","client_ip":"127.0.0.1","upstream_response_time":"2","resp_size":"10476","route_id":"cca80823-3189-47fb-8a1f-21ebe7xxxxxx","route_name": "","service_id":"17caaef5-dc84-4c93-8148-e63ce1xxxxxx","service_name": "","consumer_id":"","consumer_name": ""}
Parameter | Required | Default Value | Description |
cls_host | Yes | - | CLS API Host. Select a domain name address as needed, for example, ap-beijing.cls.tencentyun.com. For details, see CLS doc. |
cls_topic | Yes | - | Target CLS topic to which logs are reported. |
secret_id | Yes | - | SecretID of the Tencent Cloud account. |
secret_key | Yes | - | SecretKey of the Tencent Cloud account. |
log_req_body | Yes | false | Whether to record the log field in the request body. When it is enabled, it affects gateway performance. |
log_resp_body | Yes | false | Whether to record the log field in the response body. When it is enabled, it affects gateway performance. |
max_req_body_size | Yes | 10240 | Maximum length (in bytes) of the log field in the request body. Bodies whose length exceeds the limit will be truncated. |
max_resp_body_size | Yes | 10240 | Maximum length (in bytes) of the log field in the response body. Bodies whose length exceeds the limit will be truncated. |
batch_size | Yes | 100 | Number of logs reported at a time. It is recommended that the size of logs in a batch does not exceed 8 MB. |
retry_count | Yes | 3 | Maximum number of retries. |
mode | No | memory | memory: asynchronously reports logs from the memory queue through the CLS software development kit (SDK). access_log: uses the access_log module with LogListener for collection and reporting, which may be affected by disk performance. If required, submit a ticket to enable it. |
fallback_to_access_log | No | false | Whether to downgrade to the access_log reporting mode if a large number of logs are accumulated in the reporting queue when the memory mode is used. If required, submit a ticket to enable it. |
cls:UploadLog policy permission. For details, see Using APIs/SDKs to Upload Data in CLS Access Policy Template.Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback