Conversation
Simplify Sentry logic. Improve Sentry logging. Fix toggle timings.
Remove package script duplication.
Builds ready [67c66b0]
Page Load Metrics (303 ± 270 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26192 +/- ##
===========================================
- Coverage 69.96% 69.95% -0.01%
===========================================
Files 1411 1411
Lines 49946 49963 +17
Branches 13805 13800 -5
===========================================
+ Hits 34942 34948 +6
- Misses 15004 15015 +11 ☔ View full report in Codecov by Sentry. |
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@sentry/types@8.19.0 |
Builds ready [a081498]
Page Load Metrics (252 ± 252 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [d6d4112]
Page Load Metrics (231 ± 244 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Builds ready [b52bd00]
Page Load Metrics (240 ± 257 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Tested locally, work as expected 👍🏻 |
|
Missing release label release-12.2.0 on PR. Adding release label release-12.2.0 on PR and removing other release labels(release-12.4.0), as PR was cherry-picked in branch 12.2.0. |



Description
Fix the automatic tracking of Sentry sessions, and refactor Sentry setup to simplify logic and improve logging.
Specifically:
autoSessionTrackingenablement.METAMASK_ENVIRONMENTis notproductionandSENTRY_DSN_DEVis specified.setupSentryfunction.process.envandglobal.stateHooksinternally.setupSentry.js.getStatecallback.debugpackage based on theDEBUGenvironment variable.DEBUG=metamask:sentry:*in.metamask.rcMETAMASK_DEBUGis enabled.SENTRY_DSN_DEVto 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