Skip to content

Conversation

@gauthierpetetin
Copy link
Contributor

@gauthierpetetin gauthierpetetin commented Jan 8, 2026

Description

This PR is a follow-up PR for #39010
It adds Sentry instrumentation to monitor storage-related errors and enables error reporting even during database corruption scenarios.

Context

Firefox users occasionally experience database corruption that prevents MetaMask from reading or writing to storage.local. This manifests as "Error: An unexpected error occurred". We have workarounds in place (vault recovery flow, storage error toast), but we lacked visibility into how often these occur in production.

Changes

1. Added Sentry Tags and Fingerprints

  • Added persistence.error tags to captureException calls:
    • get-failed - when storage.local.get() fails
    • set-failed - when storage.local.set() fails
    • persist-failed - when IndexedDB backup fails
    • backup-db-open-failed - when backup database can't be opened
  • Added custom fingerprints to prevent Sentry's deduplication from dropping events with the same underlying error message (e.g., Firefox's generic "An unexpected error occurred")

2. Enabled Sentry Reporting During Storage Corruption

  • Added MetaMetricsController to the list of backed-up controllers in IndexedDB
  • Added getBackupState hook to allow Sentry to check MetaMetrics consent from backup when primary storage is unavailable
  • This ensures we can report errors to Sentry even during database corruption scenarios (when primary storage is unreadable)

3. Added Recovery Tracking for Temporary Failures

  • Added captureMessage calls to track when storage operations recover after a temporary failure:
    • set-recovered - when storage.local.set() succeeds after a previous failure
    • persist-recovered - when IndexedDB backup succeeds after a previous failure
  • This helps answer the question: "Do set calls ever fail and then succeed in the same session?"
  • Uses persistence.event tag (vs persistence.error) to distinguish recovery events from error events

4. Fixed State Persistence in Backup Code Path

  • Fixed bug where backup code wrote unfiltered controller state (including non-persistent properties like KeyringController.encryptionKey) to storage
  • Now uses deriveStateFromMetadata() to filter to only persist: true properties, matching the normal stateChange behavior

Changelog

CHANGELOG entry: Adds Sentry instrumentation to monitor storage-related errors and enables error reporting even during database corruption scenarios.

Related issues

None

Manual testing steps

Same as in this PR: #39010

Screenshots/Recordings

Before

Nothing visible in Sentry

After

Screenshot 2026-01-08 at 22 24 27

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Sentry instrumentation & recovery

  • Add persistence.error tags and custom fingerprints to captureException for storage paths: get-failed, set-failed, set-backup-failed, persist-failed, persist-backup-failed, and backup-db-open-failed.
  • Emit captureMessage recovery signals with persistence.event tags: set-recovered and persist-recovered when writes/backups succeed after a prior failure.
  • Log & Sentry-capture storage.local.get errors without immediately throwing; throw PersistenceError with backup payload when vault is missing and a backup exists.

Backup & consent fallback

  • Add MetaMetricsController to backedUpStateKeys and Backup; update getBackup() accordingly.
  • In background.js split-state stateChange, use deriveStateFromMetadata(..., 'persist') to only back up persistent controller fields; throw if metadata missing.
  • New stateHooks.getBackupState() to read IndexedDB backup; setupSentry.getMetaMetricsEnabled falls back to backup state when primary storage retrieval fails; add getMetaMetricsEnabledFromBackupState.

PersistenceManager robustness

  • Differentiate storage.local vs IndexedDB backup failures; add Sentry tags/fingerprints per failure type and recovery notifications; notify UI via setOnSetFailed when writes fail.
  • Handle Firefox private-browsing IndexedDB InvalidStateError with tagged Sentry capture and graceful degradation.

Tests

  • Update persistence-manager.test.ts to verify new tags/fingerprints, recovery captureMessage events, backup DB open error handling, and repeated failure/success behavior.

Written by Cursor Bugbot for commit 1ca4d4d. This will update automatically on new commits. Configure here.

@gauthierpetetin gauthierpetetin self-assigned this Jan 8, 2026
@gauthierpetetin gauthierpetetin added the team-extension-platform Extension Platform team label Jan 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

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.

@github-actions github-actions bot added the size-S label Jan 8, 2026
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jan 8, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 14, 2026

Builds ready [acd3adf]
UI Startup Metrics (1314 ± 106 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13141041163110613761498
load--1095875135810311601296
domContentLoaded--1089870135010311541291
domInteractive--2816105212388
firstPaint--190671270211192360
backgroundConnect--21619726912221242
firstReactRender--1693751727
getState--3518128133860
initialActions--104112
loadScripts--88066811341019411066
setupStore--1263751223
numNetworkReqs--181178171169
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--18911591261320119432359
load--1011895135211110331308
domContentLoaded--999891134411210191302
domInteractive--33161442830116
firstPaint--1696631166223273
backgroundConnect--261204654111236580
firstReactRender--21165042328
getState--17413724026190226
initialActions--102112
loadScripts--79067711451097981093
setupStore--17105481838
numNetworkReqs--58361422559133
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--805655123091837972
load--65157483670703789
domContentLoaded--64657083369695783
domInteractive--251596182283
firstPaint--1026127943125190
backgroundConnect--3251293450102
firstReactRender--15113741621
getState--2915125153753
initialActions--102111
loadScripts--64356883168693778
setupStore--1165971227
numNetworkReqs--171173161167
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1356990217427715401983
load--68359793483696904
domContentLoaded--67459193083685898
domInteractive--35171592834112
firstPaint--1436667385193263
backgroundConnect--95768219021605
firstReactRender--22163842430
getState--16013471461159215
initialActions--103111
loadScripts--67058992181683889
setupStore--1584461721
numNetworkReqs--993929850135219
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13371073195918314261687
load--1069882155813011441285
domContentLoaded--1068881155813111441285
domInteractive--68312544294145
firstPaint--------
backgroundConnect--58193405367158
firstReactRender--1292521216
getState--165415421130
initialActions--102112
loadScripts--1033868141511110961249
setupStore--154170251246
numNetworkReqs--19995201376
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--25951835545172526534309
load--12431005284031612312042
domContentLoaded--12431005283931612282042
domInteractive--139341078157120397
firstPaint--------
backgroundConnect--122231180154131362
firstReactRender--241598102531
getState--305761336256413875
initialActions--207123
loadScripts--1193980265628811911703
setupStore--1717869214174745
numNetworkReqs--58292134086151
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16551388224218117492046
load--13751177178212614421667
domContentLoaded--13741176178112614411667
domInteractive--943027446130172
firstPaint--------
backgroundConnect--69231844490172
firstReactRender--16114941622
getState--207193261757
initialActions--103122
loadScripts--13301152172210714031542
setupStore--204248351390
numNetworkReqs--19985191576
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29072118495583035204750
load--15681103353455415673015
domContentLoaded--15671103353455415673015
domInteractive--129271123175112505
firstPaint--------
backgroundConnect--1582511452431401038
firstReactRender--23166262630
getState--30179890250500831
initialActions--217123
loadScripts--14941088331947915172983
setupStore--13371138195120633
numNetworkReqs--58271914161175
19--------
📊 Page Load Benchmark Results

Current Commit: acd3adf | Date: 1/14/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±39ms) 🟡 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 714ms (±35ms) 🟢 | historical mean value: 720ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 76ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 39ms 999ms 1.32s 1.05s 1.32s
domContentLoaded 714ms 35ms 691ms 979ms 740ms 979ms
firstPaint 75ms 11ms 60ms 176ms 84ms 176ms
firstContentfulPaint 75ms 11ms 60ms 176ms 84ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 1.04 KiB (0.01%)

The backup code was writing full controller state (including non-persistent properties like KeyringController.keyrings and encryptionKey) to storage, while the normal stateChange path correctly filters to only persist: true properties. This caused state corruption when frequently-updating controllers like MetaMetricsController triggered the backup, and is now fixed by applying the same deriveStateFromMetadata() filtering used by ComposableObservableStore.
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 15, 2026

Builds ready [598145d]
UI Startup Metrics (1299 ± 113 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--12991065160711313691512
load--1087875138410911481302
domContentLoaded--1081870137410911411289
domInteractive--2715135212382
firstPaint--168661093117203308
backgroundConnect--21619925711221243
firstReactRender--1693051827
getState--3616104124059
initialActions--104112
loadScripts--87265611661089321073
setupStore--1382341520
numNetworkReqs--181180171167
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--------
load--------
domContentLoaded--------
domInteractive--------
firstPaint--------
backgroundConnect--------
firstReactRender--------
getState--------
initialActions--------
loadScripts--------
setupStore--------
numNetworkReqs--------
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--770622127996815942
load--61354399072649740
domContentLoaded--60853998371644734
domInteractive--2414110201977
firstPaint--1095529457157228
backgroundConnect--3851333967109
firstReactRender--15103741623
getState--3011138233665
initialActions--105111
loadScripts--60553797470642727
setupStore--1054451117
numNetworkReqs--181188191172
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1322979207226215111853
load--67656598492682937
domContentLoaded--66755997892672931
domInteractive--35161513033130
firstPaint--1296246873151278
backgroundConnect--86765417921601
firstReactRender--22173132429
getState--14913023016156195
initialActions--104111
loadScripts--66455797090670922
setupStore--1686391637
numNetworkReqs--1003924150139228
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13361062196218214681639
load--1073895170913711331342
domContentLoaded--1072895170913811331341
domInteractive--65311523692134
firstPaint--------
backgroundConnect--56212785058174
firstReactRender--1292421217
getState--12591111127
initialActions--102122
loadScripts--1039878156711210941245
setupStore--144138181139
numNetworkReqs--19985191476
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--24381959509958924344147
load--1233963264739312962529
domContentLoaded--1233963264739312962529
domInteractive--126301083154111322
firstPaint--------
backgroundConnect--130221157206108854
firstReactRender--21145652328
getState--27766858232386744
initialActions--204123
loadScripts--1172945261931512771905
setupStore--1415792188127647
numNetworkReqs--59302274179148
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15741264215419716771952
load--13091099174411913771580
domContentLoaded--13091099174412013771580
domInteractive--822823243117142
firstPaint--------
backgroundConnect--60202845263190
firstReactRender--15112931722
getState--2282333417114
initialActions--103122
loadScripts--12751087157810013331475
setupStore--185213271568
numNetworkReqs--19983191475
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--2966207510349116034564749
load--16471169881292515263174
domContentLoaded--16461169881292515253169
domInteractive--168285533562103452
firstPaint--------
backgroundConnect--2113112383161651140
firstReactRender--2616260252531
getState--287411053248425831
initialActions--207123
loadScripts--15151124761475014722793
setupStore--1407805196134679
numNetworkReqs--59241463487137
19--------
📊 Page Load Benchmark Results

Current Commit: 598145d | Date: 1/15/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±42ms) 🟡 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 716ms (±37ms) 🟢 | historical mean value: 719ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±13ms) 🟢 | historical mean value: 76ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 42ms 997ms 1.34s 1.06s 1.34s
domContentLoaded 716ms 37ms 689ms 983ms 740ms 983ms
firstPaint 76ms 13ms 60ms 188ms 88ms 188ms
firstContentfulPaint 76ms 13ms 60ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 7.06 KiB (0.14%)
  • ui: 343 Bytes (0%)
  • common: 1.23 KiB (0.01%)

@gauthierpetetin gauthierpetetin changed the title Add/improve Sentry instrumentation for storage related error handling feat: add/improve Sentry instrumentation for storage related error handling Jan 15, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 15, 2026

Builds ready [598145d]
UI Startup Metrics (1299 ± 113 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--12991065160711313691512
load--1087875138410911481302
domContentLoaded--1081870137410911411289
domInteractive--2715135212382
firstPaint--168661093117203308
backgroundConnect--21619925711221243
firstReactRender--1693051827
getState--3616104124059
initialActions--104112
loadScripts--87265611661089321073
setupStore--1382341520
numNetworkReqs--181180171167
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--18551545247319219742307
load--1021890159512810391358
domContentLoaded--1008883158412910331331
domInteractive--34171302533104
firstPaint--197701385184226388
backgroundConnect--257204688110229606
firstReactRender--21164042327
getState--18013785871187228
initialActions--102111
loadScripts--80067713631278091126
setupStore--1774971835
numNetworkReqs--58371392358117
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--770622127996815942
load--61354399072649740
domContentLoaded--60853998371644734
domInteractive--2414110201977
firstPaint--1095529457157228
backgroundConnect--3851333967109
firstReactRender--15103741623
getState--3011138233665
initialActions--105111
loadScripts--60553797470642727
setupStore--1054451117
numNetworkReqs--181188191172
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1322979207226215111853
load--67656598492682937
domContentLoaded--66755997892672931
domInteractive--35161513033130
firstPaint--1296246873151278
backgroundConnect--86765417921601
firstReactRender--22173132429
getState--14913023016156195
initialActions--104111
loadScripts--66455797090670922
setupStore--1686391637
numNetworkReqs--1003924150139228
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13361062196218214681639
load--1073895170913711331342
domContentLoaded--1072895170913811331341
domInteractive--65311523692134
firstPaint--------
backgroundConnect--56212785058174
firstReactRender--1292421217
getState--12591111127
initialActions--102122
loadScripts--1039878156711210941245
setupStore--144138181139
numNetworkReqs--19985191476
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--24381959509958924344147
load--1233963264739312962529
domContentLoaded--1233963264739312962529
domInteractive--126301083154111322
firstPaint--------
backgroundConnect--130221157206108854
firstReactRender--21145652328
getState--27766858232386744
initialActions--204123
loadScripts--1172945261931512771905
setupStore--1415792188127647
numNetworkReqs--59302274179148
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15741264215419716771952
load--13091099174411913771580
domContentLoaded--13091099174412013771580
domInteractive--822823243117142
firstPaint--------
backgroundConnect--60202845263190
firstReactRender--15112931722
getState--2282333417114
initialActions--103122
loadScripts--12751087157810013331475
setupStore--185213271568
numNetworkReqs--19983191475
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--2966207510349116034564749
load--16471169881292515263174
domContentLoaded--16461169881292515253169
domInteractive--168285533562103452
firstPaint--------
backgroundConnect--2113112383161651140
firstReactRender--2616260252531
getState--287411053248425831
initialActions--207123
loadScripts--15151124761475014722793
setupStore--1407805196134679
numNetworkReqs--59241463487137
19--------
📊 Page Load Benchmark Results

Current Commit: 598145d | Date: 1/15/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±42ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 716ms (±37ms) 🟢 | historical mean value: 720ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±13ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 42ms 997ms 1.34s 1.06s 1.34s
domContentLoaded 716ms 37ms 689ms 983ms 740ms 983ms
firstPaint 76ms 13ms 60ms 188ms 88ms 188ms
firstContentfulPaint 76ms 13ms 60ms 188ms 88ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 7.06 KiB (0.14%)
  • ui: 343 Bytes (0%)
  • common: 1.23 KiB (0.01%)

);
persistenceManager.update(key, state);
});
}
Copy link
Contributor Author

@gauthierpetetin gauthierpetetin Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix introduced in this commit: 598145d
Without this fix, should update from data state to split state E2E test was failing.


Adding MetaMetricsController to the list of backed up controllers (cf. discussion here) broke the should update from data state to split state E2E test.
It seems we were persisting the full state to storage (including non-persistent properties), instead of only persisting the persistent properties. This wasn’t visible before adding MetaMetricsController because the other backed up controllers (KeyringController and AppMetadataController) didn’t change very frequently, whereas MetaMetricsController changes more often. Persisting only persistent properties fixed the E2E test.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 15, 2026

Builds ready [1ca4d4d]
UI Startup Metrics (1318 ± 114 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13181066166211413901519
load--1094885137111111561300
domContentLoaded--1086877136211011471294
domInteractive--2816111202484
firstPaint--173651251146197283
backgroundConnect--22019927014224254
firstReactRender--16103341826
getState--371978124268
initialActions--105112
loadScripts--87566011551109391073
setupStore--1262741321
numNetworkReqs--171177171168
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--19011504267020520192394
load--1015892142710910371314
domContentLoaded--1003888141211010281291
domInteractive--3317132213589
firstPaint--177691299171209328
backgroundConnect--282203727134240606
firstReactRender--22174242330
getState--17513528827190226
initialActions--102112
loadScripts--79168111941068091080
setupStore--17104371835
numNetworkReqs--57361241960110
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--794654109887832983
load--63857284565656782
domContentLoaded--63356683964652776
domInteractive--241584172075
firstPaint--1046037856124233
backgroundConnect--3151293149103
firstReactRender--15113941726
getState--3415131174560
initialActions--103111
loadScripts--63056483663649772
setupStore--147274271338
numNetworkReqs--171175171168
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1356960230223514381842
load--69860390873724890
domContentLoaded--68859890074712882
domInteractive--36181562735115
firstPaint--1406839870187279
backgroundConnect--87766117135553
firstReactRender--23174242531
getState--16012323618167193
initialActions--102111
loadScripts--68559589273709872
setupStore--1764581739
numNetworkReqs--66372263374136
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--14641129209620316041892
load--1170957191517312511553
domContentLoaded--1170957190917212511552
domInteractive--853389893100192
firstPaint--------
backgroundConnect--702126057109206
firstReactRender--14104551325
getState--146136181237
initialActions--104122
loadScripts--1126941189415611801433
setupStore--153162191239
numNetworkReqs--19980191473
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--24701828667569224504019
load--12961011532957712262615
domContentLoaded--12961010532957712262615
domInteractive--167354372438126327
firstPaint--------
backgroundConnect--10824887130104274
firstReactRender--23156182430
getState--29067840236475824
initialActions--208123
loadScripts--1254989531255612022495
setupStore--1347809191107627
numNetworkReqs--59292124848201
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--15491316202517216691889
load--13001099167411813811542
domContentLoaded--12991099167211813801542
domInteractive--852920840115143
firstPaint--------
backgroundConnect--53192113961139
firstReactRender--15106071521
getState--187215231642
initialActions--106122
loadScripts--12661081160110213421448
setupStore--174270331252
numNetworkReqs--19988191372
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--29092172917797828354741
load--16321179773579816513049
domContentLoaded--16321178773579816513049
domInteractive--142311185190110572
firstPaint--------
backgroundConnect--1892214992801391010
firstReactRender--2616103132935
getState--333821910283500783
initialActions--207123
loadScripts--15441156770873715032808
setupStore--121111224196100630
numNetworkReqs--60282114948198
19--------
📊 Page Load Benchmark Results

Current Commit: 1ca4d4d | Date: 1/15/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±43ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 720ms (±40ms) 🟢 | historical mean value: 720ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±11ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 43ms 1.01s 1.34s 1.06s 1.34s
domContentLoaded 720ms 40ms 697ms 1.01s 751ms 1.01s
firstPaint 76ms 11ms 60ms 168ms 84ms 168ms
firstContentfulPaint 76ms 11ms 60ms 168ms 84ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 405 Bytes (0.01%)
  • ui: 0 Bytes (0%)
  • common: 1.04 KiB (0.01%)

@DDDDDanica
Copy link
Contributor

LGTM !

@github-project-automation github-project-automation bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Jan 16, 2026
@HowardBraham HowardBraham added this pull request to the merge queue Jan 16, 2026
@gauthierpetetin gauthierpetetin changed the title feat: add/improve Sentry instrumentation for storage related error handling feat: add/improve Sentry instrumentation for storage related error handling cp-13.15.0 Jan 16, 2026
Merged via the queue into main with commit a200b56 Jan 16, 2026
189 checks passed
@HowardBraham HowardBraham deleted the database-corruption-workarounds-instrumentation branch January 16, 2026 18:59
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2026
@metamaskbot metamaskbot added the release-13.16.0 Issue or pull request that will be included in release 13.16.0 label Jan 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-13.16.0 Issue or pull request that will be included in release 13.16.0 size-M team-extension-platform Extension Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Mysterious Firefox error "An unexpected error occurred"

6 participants