Skip to content

Instantiate a logger instance per request #294

Description

@confused-Techie

Using the proposed dynamic context from #293 we could create a Logger instance per request, which most importantly would allow us to attach logs to a transaction ID after determining we are in a GCP environment.

While doing this means we then have to pass this new ctx through every layer, it importantly would allow us to track all logs to a singular request, rather than having to piece it together mentally every time we have to look at the logs.

Additionally, being able to log anything attached to a specific request means we could log additional data not included in GCP logs by default, such as additional headers (specifically Server-Timing), or authenticated users on a request.

Potentially we could even use it to link frontend requests that trigger a backend request, so that we are able to track the full lifecycle of a singular request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions