bloom-backend icon indicating copy to clipboard operation
bloom-backend copied to clipboard

Add requestId and sessionId to logs

Open eleanorreem opened this issue 7 months ago • 2 comments

Overview

We currently don't log request IDs or session IDs in our logs. These would be hugely helpful with debugging. Every time we call logger.log or logger.error, the output should be decorated with both requestIds and sessionIds. We are currently refactoring/ improving our logs so any suggestions for improving are welcome.

Action Items

  • [ ] Add sessionID and requestID to logs/errors
  • [ ] Make a PR and tag @eleanorreem or @annarhughes

Resources/Instructions

  • [ ] https://yflooi.medium.com/nestjs-request-and-response-logging-with-middleware-b486121e4907
  • [ ] https://docs.nestjs.com/techniques/session

eleanorreem avatar Jul 18 '24 10:07 eleanorreem