Add documentation for the dump_all_vars() sample fetch function in the
configuration manual. This function was introduced in the previous commit
to dump all variables in a given scope with optional prefix filtering.

The documentation includes:
- Function signature and return type
- Description of output format
- Explanation of scope and prefix arguments
- Usage examples for common scenarios

This completes the implementation of GitHub issue #1623.
---
 doc/configuration.txt | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/doc/configuration.txt b/doc/configuration.txt
index 43f25a8c7..263382685 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -22928,6 +22928,35 @@ var(<var-name>[,<default>]) : undefined
   return it as a string. Empty strings are permitted. See section 2.8 about
   variables for details.
 
+dump_all_vars([<scope>][,<prefix>]) : string
+  Returns a comma-separated list of all variables in the specified scope,
+  optionally filtered by name prefix. The output format is:
+  var1=value1, var2=value2, ...
+
+  String values are quoted and special characters are escaped (", \, \r, \n,
+  \b, \0). All sample types are supported and automatically converted to
+  strings.
+
+  The <scope> argument is optional and can be one of: sess, txn, req, res,
+  proc. If omitted, the scope is determined by the context (txn for streams,
+  sess for sessions, proc otherwise).
+
+  The <prefix> argument is optional and filters variables whose names start
+  with the specified prefix (after removing the scope prefix).
+
+  This is particularly useful for debugging, logging, or exporting variable
+  states.
+
+  Examples:
+    # Dump all transaction variables
+    http-request return string %[dump_all_vars(txn)]
+
+    # Dump only variables starting with "user"
+    http-request set-header X-User-Vars "%[dump_all_vars(txn,user)]"
+
+    # Dump all process variables
+    http-request return string %[dump_all_vars(proc)]
+
 wait_end : boolean
   This fetch either returns true when the inspection period is over, or does
   not fetch. It is only used in ACLs, in conjunction with content analysis to
-- 
2.50.1 (Apple Git-155)



Reply via email to