Skip to content
This repository was archived by the owner on Nov 16, 2019. It is now read-only.
This repository was archived by the owner on Nov 16, 2019. It is now read-only.

Provide a "unique request id" in stex.log  #43

@thejollyrogers

Description

@thejollyrogers

When a stex application recieves a request, it would be nice to attach a unique id to every log that arrises from that request. that way logs could be tracked by request id. the asynchronous nature of node makes this hard as you lose context in the callback after the event loop.

here's a potential solution or model we could use https://datahero.com/blog/2014/05/22/node-js-preserving-data-across-async-callbacks/

Ideally most of the functionality would be abstracted into Stex, and all the client would need to do is add some stex speicific middleware to their request chain, and any further call to Stex.log will automatically add that request id to the log.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions