core icon indicating copy to clipboard operation
core copied to clipboard

Logger async hooks

Open zoe-codez opened this issue 1 year ago • 0 comments

🪤 Context

Want to create workflows where all logs that get emitted all have a common property added to the logs. For example:

  1. incoming http request
  2. provide requestId to logger
  3. .... business logic
  4. all logs that get emitted during 3 automatically have requestId attached, even if the log command didn't provide

🩻 Additional details

This should be a standard flow, not focusing on just http use cases

  • use AsyncLocalStorage

zoe-codez avatar Aug 11 '24 14:08 zoe-codez