This is an automated email from the ASF dual-hosted git repository.

traky pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ecc74110 docs: update for `max_req_body_bytes ` and 
`max_resp_body_bytes ` attributes in `kafka-logger` plugin  (#11505)
4ecc74110 is described below

commit 4ecc741100c4968f31717fac3d7de32cff2b2ff5
Author: Traky Deng <[email protected]>
AuthorDate: Mon Aug 26 10:53:35 2024 +0800

    docs: update for `max_req_body_bytes ` and `max_resp_body_bytes ` 
attributes in `kafka-logger` plugin  (#11505)
    
    * correct description for include_resp_body and improve the description
    
    * add the attributes to zh doc
    
    * fix typo
---
 docs/en/latest/plugins/kafka-logger.md | 4 ++--
 docs/zh/latest/plugins/kafka-logger.md | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/en/latest/plugins/kafka-logger.md 
b/docs/en/latest/plugins/kafka-logger.md
index fa70eb129..a1a717c5e 100644
--- a/docs/en/latest/plugins/kafka-logger.md
+++ b/docs/en/latest/plugins/kafka-logger.md
@@ -55,10 +55,10 @@ It might take some time to receive the log data. It will be 
automatically sent a
 | log_format | object | False    |   |               | Log format declared as 
key value pairs in JSON format. Values only support strings. 
[APISIX](../apisix-variable.md) or 
[Nginx](http://nginx.org/en/docs/varindex.html) variables can be used by 
prefixing the string with `$`. |
 | include_req_body       | boolean | False    | false          | [false, true] 
        | When set to `true` includes the request body in the log. If the 
request body is too big to be kept in the memory, it can't be logged due to 
Nginx's limitations.                                                            
                                                                                
                                     |
 | include_req_body_expr  | array   | False    |                |               
        | Filter for when the `include_req_body` attribute is set to `true`. 
Request body is only logged when the expression set here evaluates to `true`. 
See [lua-resty-expr](https://github.com/api7/lua-resty-expr) for more.          
                                                                                
                                |
-| max_req_body_bytes     | integer | False    | 524288         | >=1           
        | Request bodies within this size will be pushed to kafka, if the size 
exceeds the configured value it will be truncated before pushing to Kafka.      
                                                                                
                                                                                
                            |
+| max_req_body_bytes     | integer | False    | 524288         | >=1           
        | Maximum request body allowed in bytes. Request bodies falling within 
this limit will be pushed to Kafka. If the size exceeds the configured value, 
the body will be truncated before being pushed to Kafka.                        
                                                                                
                                                                                
          |
 | include_resp_body      | boolean | False    | false          | [false, true] 
        | When set to `true` includes the response body in the log.             
                                                                                
                                                                                
                                                                                
                           |
 | include_resp_body_expr | array   | False    |                |               
        | Filter for when the `include_resp_body` attribute is set to `true`. 
Response body is only logged when the expression set here evaluates to `true`. 
See [lua-resty-expr](https://github.com/api7/lua-resty-expr) for more.          
                                                                                
                              |
-| max_resp_body_bytes    | integer | False    | 524288         | >=1           
        | Request bodies within this size will be pushed to kafka, if the size 
exceeds the configured value it will be truncated before pushing to Kafka.      
                                                                                
                                                                                
                            |
+| max_resp_body_bytes    | integer | False    | 524288         | >=1           
        | Maximum response body allowed in bytes. Response bodies falling 
within this limit will be pushed to Kafka. If the size exceeds the configured 
value, the body will be truncated before being pushed to Kafka.                 
                                                                                
                                                                                
                 |
 | cluster_name           | integer | False    | 1              | [0,...]       
        | Name of the cluster. Used when there are two or more Kafka clusters. 
Only works if the `producer_type` attribute is set to `async`.                  
                                                                                
                                                                                
                            |
 | producer_batch_num     | integer | optional    | 200            | [1,...]    
           | `batch_num` parameter in 
[lua-resty-kafka](https://github.com/doujiang24/lua-resty-kafka). The merge 
message and batch is send to the server. Unit is message count.                 
                                                                                
                                                                                
                                                            [...]
 | producer_batch_size    | integer | optional    | 1048576        | [0,...]    
           | `batch_size` parameter in 
[lua-resty-kafka](https://github.com/doujiang24/lua-resty-kafka) in bytes.      
                                                                                
                                                                                
                                                                                
                                                       [...]
diff --git a/docs/zh/latest/plugins/kafka-logger.md 
b/docs/zh/latest/plugins/kafka-logger.md
index 1fdfe3b59..e708a21b8 100644
--- a/docs/zh/latest/plugins/kafka-logger.md
+++ b/docs/zh/latest/plugins/kafka-logger.md
@@ -53,8 +53,10 @@ description: API 网关 Apache APISIX 的 kafka-logger 插件用于将日志作
 | log_format             | object  | 否   | |         | 以 JSON 
格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 
变量](../apisix-variable.md) 或 [NGINX 
内置变量](http://nginx.org/en/docs/varindex.html)。 |
 | include_req_body       | boolean | 否     | false          | [false, true]    
     | 当设置为 `true` 时,包含请求体。**注意**:如果请求体无法完全存放在内存中,由于 NGINX 的限制,APISIX 无法将它记录下来。|
 | include_req_body_expr  | array   | 否     |                |                  
     | 当 `include_req_body` 属性设置为 `true` 时进行过滤。只有当此处设置的表达式计算结果为 `true` 
时,才会记录请求体。更多信息,请参考 [lua-resty-expr](https://github.com/api7/lua-resty-expr)。 |
+| max_req_body_bytes     | integer | 否    | 524288         | >=1               
    | 允许的最大请求正文(以字节为单位)。在此限制内的请求体将被推送到 Kafka。如果大小超过配置值,则正文在推送到 Kafka 之前将被截断。    
                                                                                
                                                                                
                              |
 | include_resp_body      | boolean | 否     | false          | [false, true]    
     | 当设置为 `true` 时,包含响应体。 |
 | include_resp_body_expr | array   | 否     |                |                  
     | 当 `include_resp_body` 属性设置为 `true` 时进行过滤。只有当此处设置的表达式计算结果为 `true` 
时才会记录响应体。更多信息,请参考 [lua-resty-expr](https://github.com/api7/lua-resty-expr)。|
+| max_resp_body_bytes    | integer | 否    | 524288         | >=1               
    | 允许的最大响应正文(以字节为单位)。低于此限制的响应主体将被推送到 Kafka。如果大小超过配置值,则正文在推送到 Kafka 之前将被截断。   
                                                                                
                                                                                
                               |
 | cluster_name           | integer | 否     | 1              | [0,...]          
     | Kafka 集群的名称,当有两个及以上 Kafka 集群时使用。只有当 `producer_type` 设为 `async` 
模式时才可以使用该属性。|
 | producer_batch_num     | integer | 否     | 200            | [1,...]          
     | 对应 [lua-resty-kafka](https://github.com/doujiang24/lua-resty-kafka) 中的 
`batch_num` 参数,聚合消息批量提交,单位为消息条数。 |
 | producer_batch_size    | integer | 否     | 1048576        | [0,...]          
     | 对应 [lua-resty-kafka](https://github.com/doujiang24/lua-resty-kafka) 中的 
`batch_size` 参数,单位为字节。 |

Reply via email to