tokers commented on a change in pull request #5012:
URL: https://github.com/apache/apisix/pull/5012#discussion_r712861888



##########
File path: docs/en/latest/architecture-design/debug-mode.md
##########
@@ -83,3 +83,25 @@ hook_phase: # Module Function List, Name: hook_phase
     - http_log_phase
 #END
 ```
+
+### Enable Advanced Debug Mode Dynamically
+
+The advanced debug mode can take effect in particular requests by dynamic rule.
+
+Example:
+
+```yaml
+http_filter:
+  enable: true # Enable/Disable Advanced Debug Mode Dynamically
+  enable_header_name: X-APISIX-Dynamic-Debug # Trace for the request with this 
header
+......
+#END
+```
+
+Dynamically enable advanced debugging mode in a particular request like this:
+
+```shell
+curl 127.0.0.1:9090/hello --header 'X-APISIX-Dynamic-Debug: foo'
+```
+
+Notice: We can not only hook the `apisix.http_access_phase` module in 
particular requests. Because the request enters the `apisix.http_access_phase` 
module before it determines whether advanced debug mode is dynamically enabled.

Review comment:
       The meaning of this sentence is tough to understand, but I got the 
correct one from its Chinese version. Maybe the following one is better:
   
   ```suggestion
   Notice: We can not hook the `apisix.http_access_phase` module for particular 
requests, since whether the advanced debug mode is enabled is determined after 
these requests enter such phase```




-- 
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