ngx_http_pinba_module
ngx_http_pinba_module copied to clipboard
Customizable server and script name
I added an ability to set server_name
and script_name
from variables (e.g.: $sent_http_x_pinba_server
, header sent from PHP).
Now, before $pinba_request_uri
it looks at pinba_script_name
, and only if it's empty or failed to parse, it will use variable as fallback.
And, now we can customize server_name
as well (why can't we do that earlier?:)) with similar logic - first, it looks at pinba_server_name
, and if it failed or empty, then it fallback to default.
P.S. It was like third time when i wrote C, so maybe i implemented it not the way it should be, but it works :)
Example usage:
fastcgi_hide_header X-Pinba-Server;
fastcgi_hide_header X-Pinba-Script;
pinba_server_name $upstream_http_x_pinba_server;
pinba_script_name $upstream_http_x_pinba_script;