backtraces
The 'backtraces' directive enables detailed stack trace logging for errors in Wasm modules used in NGINX.
Description
The 'backtraces' directive is used in the context of the NGINX Proxy-Wasm module, specifically for debugging and development purposes. When set to 'on', it activates enhanced stack trace logging whenever an error occurs in the execution of WebAssembly (Wasm) filters or modules. This is particularly useful for developers who need to identify and troubleshoot issues within their Wasm implementations, as it provides visibility into the specific call stack at the time of the error. The stack traces can help pinpoint the exact functions and lines where failures occur, thus streamlining the debugging process.
When the 'backtraces' directive is configured, it interacts with the overall debugging mechanism of the NGINX environment. It requires that the NGINX is built with debug support enabled, which makes additional diagnostic features available. This directive does not take any parameters or arguments, focusing solely on toggling the backtrace feature. Consequently, its usage is straightforward and involves a simple on/off setting, providing a clear delineation for when enhanced logging should be active or inactive. It is important to utilize this directive judiciously in production environments due to the potential verbosity of the output, which may impact performance and readability in log files.
Config Example
wasm {
module my_filter /path/to/my_filter.wasm;
backtraces on;
}Enabling 'backtraces' may lead to verbose logging that can clutter error logs and affect performance.
Ensure NGINX is compiled with debug support to effectively utilize this directive.