pinguo-liuzhaohui / nginx-logid

Unique log id on every request to nginx.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NGINX plugin that sets a different logid on each and every request.

It is meant to trace one or several upstream queries triggered by a single incoming 
request.

The $logid can be used to log it.

It can also be propagated as a header to an upstram server using proxy_set_header. 
The upstream server will look for the header and use the same logid.

logid on; # set up the module
logid_header X-Ngx-LogId; # set the header to look for in the 
                                      # incoming query.

About

Unique log id on every request to nginx.


Languages

Language:C 100.0%