navendu-pottekkat commented on code in PR #7064:
URL: https://github.com/apache/apisix/pull/7064#discussion_r876080313


##########
docs/en/latest/plugins/request-id.md:
##########
@@ -23,20 +29,60 @@ title: request-id
 
 ## Description
 
-`request-id` plugin adds a unique ID (UUID) to each request proxied through 
APISIX. This plugin can be used to track an
-API request. The plugin will not add a request id if the `header_name` is 
already present in the request.
+The `request-id` Plugin adds a unique ID to each request proxied through 
APISIX.
+
+This Plugin can be used to track API requests.
+
+:::note
+
+The Plugin will not add a unique ID if the request already has a header with 
the configured `header_name`.
+
+:::
 
 ## Attributes
 
-| Name                | Type    | Requirement | Default        | Valid | 
Description                                                    |
-| ------------------- | ------- | ----------- | -------------- | ----- | 
-------------------------------------------------------------- |
-| header_name         | string  | optional    | "X-Request-Id" |       | 
Request ID header name                                         |
-| include_in_response | boolean | optional    | true           |       | 
Option to include the unique request ID in the response header |
-| algorithm           | string  | optional    | "uuid"         | ["uuid", 
"snowflake", "nanoid"] | ID generation algorithm |
+| Name                | Type    | Required | Default        | Valid values     
               | Description                                                    
        |
+| ------------------- | ------- | -------- | -------------- | 
------------------------------- | 
---------------------------------------------------------------------- |
+| header_name         | string  | False    | "X-Request-Id" |                  
               | Header name for the unique request ID.                         
        |
+| include_in_response | boolean | False    | true           |                  
               | When set to `true`, adds the unique request ID in the response 
header. |
+| algorithm           | string  | False    | "uuid"         | ["uuid", 
"snowflake", "nanoid"] | Algorithm to use for generating the unique request ID. 
                |
 
-## How To Enable
+### Using snowflake algorithm to generate unique ID
 
-Create a route and enable the request-id plugin on the route:
+To use the snowflake algorithm, you have to enable it first on your 
configuration file (`conf/config.yaml`):
+
+```yaml title="conf/config.yaml"
+plugin_attr:
+  request-id:
+    snowflake:
+      enable: true
+      snowflake_epoc: 1609459200000
+      data_machine_bits: 12
+      sequence_bits: 10
+      data_machine_ttl: 30
+      data_machine_interval: 10
+```
+
+:::warning

Review Comment:
   Yes, it was supposed to be :::caution WARNING. I missed it. Thank you for 
pointing it out.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to