When an API call fails with a 500 in production, I want one id from the response and, behind it, every log line that request wrote, in order. At Oizom every request gets a context id, every function logs through context. log , and the logs of a request are only kept when it fails or the frontend...
Source: [Dev.to](https://dev.to/panthpatel/request-scoped-logging-in-nodejs-and-express-at-oizom-3hff)