nginx request execution time monitoring
- Set Nginx shared dictionary (http section) and path to search lib + init
lua_shared_dict log_dict 5M;
lua_package_path "/etc/nginx/sites-available/?.lua;;";
init_by_lua 'require("logger")';
- Add log_by_lua block in location used to differentiate logical part pf monitoring used to set precision of time (numbers after point)
...
log_by_lua '
log(ngx.shared.log_dict, "<key>", <float>)
';
...