proxy_wasm_log_dispatch_errors
The `proxy_wasm_log_dispatch_errors` directive enables error logging for WebAssembly proxy failures during dispatching.
Description
The proxy_wasm_log_dispatch_errors directive configures NGINX to log errors that occur while dispatching events to a WebAssembly filter module. This capability is crucial for diagnosing issues that arise during WebAssembly operations in a proxy context. When this directive is set to on, any errors encountered during the dispatch process will be recorded in NGINX's error logs with detailed information, allowing developers and administrators to troubleshoot WebAssembly-related problems effectively.
The directive accepts a single argument: a boolean value, which can be on or off. Setting it to on activates the error logging feature, while the off state disables it. The behavior of the directive primarily affects how error handling is executed in association with WebAssembly modules integrated into the NGINX configuration. By utilizing this directive, users can ensure that they have captured all necessary error information from WebAssembly execution, which can be invaluable during testing and production scenarios.
Overall, whenever WebAssembly filters are employed within NGINX, utilizing proxy_wasm_log_dispatch_errors on; is recommended to gain insights into potential failures caused by issues in the WASM binaries or NGINX itself, ultimately improving system reliability and observability.
Config Example
http {
proxy_wasm_log_dispatch_errors on;
server {
listen 8080;
location / {
proxy_pass http://backend;
proxy_wasm my_filter;
}
}
}Ensure that the logging level is appropriately set to capture error logs; otherwise, errors may not appear in the logs.
Disabling logging with off can make debugging difficult when issues arise with WebAssembly modules.