ngx_http_pinba_module icon indicating copy to clipboard operation
ngx_http_pinba_module copied to clipboard

Customizable server and script name

Open olegfedoseev opened this issue 9 years ago • 1 comments

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 :)

olegfedoseev avatar Aug 17 '15 16:08 olegfedoseev

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;

olegfedoseev avatar Aug 19 '15 04:08 olegfedoseev