Skip to content

Built-in support for AsyncLocalStorage #13

@aklinker1

Description

@aklinker1

Add a store object to the request context equal that lets you manipulate a AsyncLocalStorage store, then provide a helper function to get the store anywhere in the function call stack.

For example, this would be help for logging request IDs for all logs from a request without passing down the request ID everywhere.

Alternatively, I could provide a "wrapper" option to wrap the fetch function in your own async local storage. But I don't think that's needed since the context will be per request, which zeta is responsible for handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions