we have a web server written in GO. we are using the gorilla/mux package.
we want to add a request id to all the logs on the handler side - so that we will be able distinguish later which log is related to which request (we can receive a lot of requests that can be processed in the same time)
Is there an easy way yo do this? that does not include passing some context or request id down the call chain to all the functions , and adding them by hand to the log?
(I understand that using the goroutine id is not good\recommended, so we are looking for some other easy solution if one exists.)
thanks!