Hi all,

I added logging of a request id to mod_jk log to ease correlation with other Apache logs, like the access log. It was motivated by a discussion with Chris, although the end result wasn't exactly what he liked most.

Currently there is no useful ID logged for IIS, because I don't know how to get one and was to lazy to generate one myself (eg. using start time plus an incremented 64 Bit atomic or alternatively get one from a header).

For Apache by default I use the one generated by mod_unique_id, but one can take it from a different env var by setting JkRequestIdIndicator. Such an env var can be populated eg. by copying in an ID that comes from a proxy in front via a request header.

Roughly 300 log statements have been converted to using the ID, about 450 are remaining not using it. Those are either not in a request context (startup, initialization) or in low level functions, to which I didn't want to pass down the higher level request service struct.

You might want to experiment with it.

Probably we could release a 1.2.49 with it. Last release was more than a year ago. No hurry though.

I someone has a good idea how to handle IIS, let me know. I found a dot.net request ID in

https://docs.microsoft.com/de-de/dotnet/api/microsoft.web.administration.request.requestid?view=iis-dotnet

but no native one in

https://docs.microsoft.com/en-us/iis/web-dev-reference/server-variables

Of course copying in one from a header with configured header name would always be possible (not implemented yet).

Best regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to