-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix: sentry sessions (#26192) [cherry-pick] #26620
Conversation
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@sentry/types@8.19.0) |
64eb4c5
to
95ecf1e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## cherry-pick/update-to-sentry-8 #26620 +/- ##
==================================================================
- Coverage 69.83% 69.82% -0.01%
==================================================================
Files 1368 1368
Lines 48653 48670 +17
Branches 13434 13429 -5
==================================================================
+ Hits 33975 33981 +6
- Misses 14678 14689 +11 ☔ View full report in Codecov by Sentry. |
Builds ready [95ecf1e]
Page Load Metrics (155 ± 169 ms)
|
Remove all dynamic `autoSessionTracking` enablement. Add a custom Sentry transport to prevent any requests reaching Sentry if metrics are disabled. Only consider metrics enabled when preference is set and onboarding is complete. Enable Sentry if `METAMASK_ENVIRONMENT` is not `production` and `SENTRY_DSN_DEV` is specified. Remove the arguments to the `setupSentry` function. Flatten all the functions within `setupSentry.js`. Log all Sentry messages via the `debug` package based on the `DEBUG` environment variable. Add additional log messages for easier debug. Add mock `SENTRY_DSN_DEV` to Flask and MMI test builds. Remove duplication in package scripts.
95ecf1e
to
eb89eaa
Compare
Builds ready [eb89eaa]
Page Load Metrics (74 ± 17 ms)
|
No release label on PR. Adding release label release-12.2.0 on PR, as PR was cherry-picked in branch 12.2.0. |
Cherry-pick of #26192 for v12.1.0. Original description:
Description
Fix the automatic tracking of Sentry sessions, and refactor Sentry setup to simplify logic and improve logging.
Specifically:
autoSessionTracking
enablement.METAMASK_ENVIRONMENT
is notproduction
andSENTRY_DSN_DEV
is specified.setupSentry
function.process.env
andglobal.stateHooks
internally.setupSentry.js
.getState
callback.debug
package based on theDEBUG
environment variable.DEBUG=metamask:sentry:*
in.metamask.rc
METAMASK_DEBUG
is enabled.SENTRY_DSN_DEV
to Flask and MMI test builds.Related issues
Fixes: #2555 #15691
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist