-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add some authentication state to sentry logs #29432
Conversation
this will help for logging some service failures that rely on authentication. We do not log sensitive and important info such as the access token
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
…at/sentry-logs-authentication-state
sessionData: { | ||
profile: true, | ||
accessToken: false, | ||
expiresIn: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will expose some useful information when inspecting sentry errors related to authenticated services. Exposes:
profile.profileId - the uuid for a given profile
profile.identifierId - a unique hash from what a user used to sign in with
expiresIn - a string that you can parse with `Date.parse()`. Can be useful if to determine if an access token expired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Builds ready [7a7aed2]
Page Load Metrics (1906 ± 71 ms)
|
Description
This adds some authentication controller state to sentry logs. We do not log sensitive and important info such as the
accessToken
.This should help with logging some of the service failures that rely on authentication.
Related issues
Fixes: N/A
Manual testing steps
DEBUG=metamask:sentry:*
andMETAMASK_DEBUG=1
can help to show the sentry state we are sending.Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist