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 2021/09/21 09:26:21 UTC

[GitHub] [apisix] tokers commented on a change in pull request #5012: feat(debug-mode): add dynamic debug mode

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: notifications-unsubscribe@apisix.apache.org

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