You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/13 16:11:53 UTC

[GitHub] [apisix] navendu-pottekkat opened a new pull request, #7246: docs: update "Loggers" Plugins 2/n

navendu-pottekkat opened a new pull request, #7246:
URL: https://github.com/apache/apisix/pull/7246

   Signed-off-by: Navendu Pottekkat <na...@gmail.com>
   
   ### Description
   
   Updates the documentation of the "Observability/Loggers" Plugins (2/n).
   
   Child PR of #6734


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] navendu-pottekkat commented on pull request #7246: docs: update "Loggers" Plugins 2/n

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on PR #7246:
URL: https://github.com/apache/apisix/pull/7246#issuecomment-1156578723

   @juzhiyuan Updated the keywords.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] juzhiyuan commented on a diff in pull request #7246: docs: update "Loggers" Plugins 2/n

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on code in PR #7246:
URL: https://github.com/apache/apisix/pull/7246#discussion_r897574584


##########
docs/en/latest/plugins/kafka-logger.md:
##########
@@ -1,5 +1,11 @@
 ---
 title: kafka-logger
+keywords:
+  - APISIX
+  - Plugin
+  - Kafka Logger
+  - kafka-logger

Review Comment:
   Hi @navendu-pottekkat, for the keyword `Kafka Logger` and `kafka-logger`, after thinking, I would prefer only to keep one of them, like `Kafka Logger.` This is because when we search keywords on Google, both are the same for search engines in my experience (I don't have direct rules to prove this).
   
   Also, how about adding `API Gateway` and `Kafka Log` here? bcoz there will have some query like `api gateway kafka log`



##########
docs/en/latest/plugins/kafka-logger.md:
##########
@@ -23,113 +29,131 @@ title: kafka-logger
 
 ## Description
 
-`kafka-logger` is a plugin which works as a Kafka client driver for the ngx_lua nginx module.
+The `kafka-logger` Plugin is used to push logs as JSON objects to Apache Kafka clusters. It works as a Kafka client driver for the ngx_lua Nginx module.
 
-This plugin provides the ability to push requests log data as JSON objects to your external Kafka clusters. In case if you did not receive the log data don't worry give it some time it will automatically send the logs after the timer function expires in our Batch Processor.
-
-For more info on Batch-Processor in Apache APISIX please refer.
-[Batch-Processor](../batch-processor.md)
+It might take some time to receive the log data. It will be automatically sent after the timer function in the [batch processor](../batch-processor.md) expires.
 
 ## Attributes
 
-| Name             | Type    | Requirement | Default        | Valid   | Description                                                                              |
-| ---------------- | ------- | ----------- | -------------- | ------- | ---------------------------------------------------------------------------------------- |
-| broker_list      | object  | required    |                |         | An array of Kafka brokers.                                                               |
-| kafka_topic      | string  | required    |                |         | Target  topic to push data.                                                              |
-| producer_type    | string  | optional    | async          | ["async", "sync"]        | Producer's mode of sending messages.          |
-| required_acks          | integer | optional    | 1              | [0, 1, -1] | The number of acknowledgments the producer requires the leader to have received before considering a request complete. This controls the durability of records that are sent. Semantics is the same as kafka producer acks(If set `acks=0`  then the producer will not wait for any acknowledgment from the server at all. The record will be immediately added to the socket buffer and considered sent. `acks=1` This will mean the leader will write the record to its local log but will respond without awaiting full acknowledgement from all followers. `acks=-1` This means the leader will wait for the full set of in-sync replicas to acknowledge the record.).      |
-| key              | string  | optional    |                |         | Used for partition allocation of messages.                                               |
-| timeout          | integer | optional    | 3              | [1,...] | Timeout for the upstream to send data.                                                   |
-| name             | string  | optional    | "kafka logger" |         | A  unique identifier to identity the batch processor.                                     |
-| meta_format      | enum    | optional    | "default"      | ["default","origin"] | `default`: collect the request information with default JSON way. `origin`: collect the request information with original HTTP request. [example](#examples-of-meta_format)|
-| include_req_body | boolean | optional    | false          | [false, true] | Whether to include the request body. false: indicates that the requested body is not included; true: indicates that the requested body is included. Note: if the request body is too big to be kept in the memory, it can't be logged due to Nginx's limitation. |
-| include_req_body_expr  | array  | optional    |          |         | When `include_req_body` is true, control the behavior based on the result of the [lua-resty-expr](https://github.com/api7/lua-resty-expr) expression. If present, only log the request body when the result is true. |
-| include_resp_body| boolean | optional    | false         | [false, true] | Whether to include the response body. The response body is included if and only if it is `true`. |
-| include_resp_body_expr  | array  | optional    |          |         | When `include_resp_body` is true, control the behavior based on the result of the [lua-resty-expr](https://github.com/api7/lua-resty-expr) expression. If present, only log the response body when the result is true. |
-| cluster_name     | integer | optional    | 1              | [0,...] | the name of the cluster. When there are two or more kafka clusters, you can specify different names. And this only works with async producer_type.|
-
-The plugin supports the use of batch processors to aggregate and process entries(logs/data) in a batch. This avoids frequent data submissions by the plugin, which by default the batch processor submits data every `5` seconds or when the data in the queue reaches `1000`. For information or custom batch processor parameter settings, see [Batch-Processor](../batch-processor.md#configuration) configuration section.
-
-### examples of meta_format
-
-- **default**:
-
-    ```json
-    {
-     "upstream": "127.0.0.1:1980",
-     "start_time": 1619414294760,
-     "client_ip": "127.0.0.1",
-     "service_id": "",
-     "route_id": "1",
-     "request": {
-       "querystring": {
-         "ab": "cd"
-       },
-       "size": 90,
-       "uri": "/hello?ab=cd",
-       "url": "http://localhost:1984/hello?ab=cd",
-       "headers": {
-         "host": "localhost",
-         "content-length": "6",
-         "connection": "close"
-       },
-       "body": "abcdef",
-       "method": "GET"
-     },
-     "response": {
-       "headers": {
-         "connection": "close",
-         "content-type": "text/plain; charset=utf-8",
-         "date": "Mon, 26 Apr 2021 05:18:14 GMT",
-         "server": "APISIX/2.5",
-         "transfer-encoding": "chunked"
-       },
-       "size": 190,
-       "status": 200
-     },
-     "server": {
-       "hostname": "localhost",
-       "version": "2.5"
-     },
-     "latency": 0
-    }
-    ```
+| Name                   | Type    | Required | Default        | Valid values          | Description                                                                                                                                                                                                                                                                                                                                      |
+| ---------------------- | ------- | -------- | -------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| broker_list            | object  | True     |                |                       | List of Kafka brokers (nodes).                                                                                                                                                                                                                                                                                                                   |
+| kafka_topic            | string  | True     |                |                       | Target topic to push the logs for organisation.                                                                                                                                                                                                                                                                                                  |
+| producer_type          | string  | False    | async          | ["async", "sync"]     | Message sending mode of the producer.                                                                                                                                                                                                                                                                                                            |
+| required_acks          | integer | False    | 1              | [0, 1, -1]            | Number of acknowledgements the leader needs to receive for the producer to consider the request complete. This controls the durability of the sent records. The attribute follows the same configuration as the Kafka `acks` attribute. See [Apache Kafka documentation](https://kafka.apache.org/documentation/#producerconfigs_acks) for more. |

Review Comment:
   Linking to Kafka Official Doc is awesome and clear!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] juzhiyuan merged pull request #7246: docs: update "Loggers" Plugins 2/n

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged PR #7246:
URL: https://github.com/apache/apisix/pull/7246


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org