Generate a common identifier to be accessible into logger options and to the error page #11561
leidsoncruz
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
Background
When a user encounters a login issue, we log the error using the logger options in our service log. The relevant code snippet looks like this:
However, the issue arises when the user is redirected to an error page displaying only a basic error code. This makes it difficult to link the error logged in our service with the specific issue the user is experiencing. As a result, when a user submits a ticket reporting a login problem, we struggle to identify the exact error in our logging service that corresponds to their issue.
Proposal
Add a new callback that allows us to generate metadata, making it available in both the logger error function and as a query parameter on the error page.
Here's how the implementation would look:
This setup allows the generated metadata, like traceId, to be available in the logger and also passed as a query parameter to the error page, facilitating easier tracking and correlation of errors.
Beta Was this translation helpful? Give feedback.
All reactions