I am developing a RESTful service using node,express and bunyan middleware. Bunyan middleware is generating a UUID and the same is available at req.reqId. So, when the logging is happening via req.log.info("log message") then the reqId is being printed in logs. But the problem i am facing is that there are many internal helpers written that does not have context of req. One solution is to pass req object to every function but this looks like a overhead to me.
Appreciate for any solution.