Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Nov 12, 2025

Description

Track RPC Update Completion from Network Banner

Summary

Adds NetworkConnectionBannerRpcUpdated event to track when users complete the RPC update flow initiated from the network connection banner.

Changes

  • New MetaMetrics event: NetworkConnectionBannerRpcUpdated
  • Tracked on: Network form submission when trackRpcUpdateFromBanner flag is set
  • Properties:
    • chain_id_caip: CAIP-2 format (e.g., eip155:1)
    • from_rpc_domain: Original RPC domain being switched from (hostname for public RPCs, 'custom' for private)
    • to_rpc_domain: New RPC domain being switched to (hostname for public RPCs, 'custom' for private)

Why

Currently we track when users click "Update RPC" (NetworkConnectionBannerUpdateRpcClicked), but not when they complete the update.

sequenceDiagram
    participant User
    participant Banner as Network Banner
    participant Form as Network Form
    participant Analytics

    Note over Banner: Network issue detected
    Banner->>User: Show "degraded" or "unavailable" banner
    Note over Analytics: 📊 NetworkConnectionBannerShown

    User->>Banner: Click "Update RPC"
    Banner->>Analytics: 📊 NetworkConnectionBannerUpdateRpcClicked
    Note right of Analytics: Existing event<br/>Tracks user INTENT

    Banner->>Form: Navigate to network settings
    User->>Form: Edit RPC endpoint
    User->>Form: Click "Save"

    Form->>Analytics: 📊 NetworkConnectionBannerRpcUpdated
    Note right of Analytics: NEW event (this PR)<br/>Tracks COMPLETION

    Form->>User: Network updated ✅
Loading

Related

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/WPC-172

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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

Adds NetworkConnectionBannerRpcUpdated event and wires a banner->form flag to track completed RPC updates with CAIP chain ID and RPC domain metadata.

  • Analytics (MetaMetrics):
    • Add MetaMetricsEventName.NetworkConnectionBannerRpcUpdated.
  • State & Actions:
    • Extend setEditedNetwork/editedNetwork with trackRpcUpdateFromBanner.
    • Update getEditedNetwork selector types accordingly.
  • UI Flow:
    • network-connection-banner: on "Update RPC", dispatch setEditedNetwork({ chainId, trackRpcUpdateFromBanner: true }) and navigate to NETWORKS_ROUTE.
    • network-list-menu: pass trackRpcUpdateFromBanner to NetworksForm.
    • NetworksForm: on Save (when editing) and flag is set, track Network Connection Banner RPC Updated with:
      • chain_id_caip (eip155:<decimal>),
      • from_rpc_domain/to_rpc_domain (public host or custom/unknown).
    • Utilize hexToNumber, isPublicEndpointUrl, onlyKeepHost for payload.
  • Tests:
    • Update banner tests to assert the new flag in setEditedNetwork.
    • Add form tests covering event emission, absence when flag not set, custom endpoints, and missing rpcEndpoints handling.

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

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner November 12, 2025 14:35
@cryptodev-2s cryptodev-2s self-assigned this Nov 12, 2025
@cryptodev-2s cryptodev-2s requested a review from mcmire November 12, 2025 14:35
@github-actions
Copy link
Contributor

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.

@metamaskbot metamaskbot added the team-core-platform Core Platform team label Nov 12, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (1 files, +6 -2)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 network-list-menu/
          • 📄 network-list-menu.tsx +6 -2

@cryptodev-2s cryptodev-2s changed the title metrics: Track when RPC update from network banner is completed feat: Track when RPC update from network banner is completed Nov 12, 2025
@cryptodev-2s cryptodev-2s force-pushed the metrics/track-network-banner-rpc-updated branch from 4a8230a to 5d75564 Compare November 12, 2025 14:37
@metamaskbot
Copy link
Collaborator

Builds ready [5d75564]
UI Startup Metrics (1217 ± 84 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1217106014198412621381
load105291812637810881206
domContentLoaded104691312597810821200
domInteractive221484161967
firstPaint67489121340710521160
backgroundConnect2272142718231241
firstReactRender26174862940
getState22869102840
initialActions001001
loadScripts824680103177868973
setupStore1172431218
numNetworkReqs1367419671
BrowserifyPower User HomeuiStartup16351469211421618992114
load1020897133416412701334
domContentLoaded1011888132316012541323
domInteractive45151975386197
firstPaint58117812914019141291
backgroundConnect24121927416253274
firstReactRender29243743437
getState17714923921189239
initialActions001011
loadScripts784662107615210151076
setupStore1392851328
numNetworkReqs1197623650169236
WebpackStandard HomeuiStartup8156951181988131108
load60855693293599904
domContentLoaded60155291589593884
domInteractive171191121445
firstPaint25658923247246887
backgroundConnect241172142456
firstReactRender28174473336
getState1162831215
initialActions001001
loadScripts59855090487591874
setupStore1164751318
numNetworkReqs1367319870
WebpackPower User HomeuiStartup1063889172823212141728
load69058611461588401146
domContentLoaded67057611121438051112
domInteractive34131103569110
firstPaint3626411153276021115
backgroundConnect48121824871182
firstReactRender28253322933
getState1417517529157175
initialActions001011
loadScripts66657411011407951101
setupStore1463192431
numNetworkReqs1107022557165225
FirefoxBrowserifyStandard HomeuiStartup14351282184111214931683
load1223110915088712791390
domContentLoaded1223110915078712791390
domInteractive1103547964109291
firstPaint------
backgroundConnect4125131185085
firstReactRender26214952741
getState1072731117
initialActions001001
loadScripts1198109014598112521350
setupStore1165671126
numNetworkReqs1266415755
BrowserifyPower User HomeuiStartup20471731317541220883175
load13111120170719614941707
domContentLoaded13111120170719614941707
domInteractive19480544172387544
firstPaint------
backgroundConnect1163280118491801
firstReactRender413065105165
getState1077113316119133
initialActions106116
loadScripts12831102167219014711672
setupStore23577234277
numNetworkReqs1367032173197321
WebpackStandard HomeuiStartup15611429200313015681879
load13351208168110013581574
domContentLoaded13341208168110013581574
domInteractive943321333112153
firstPaint------
backgroundConnect44231141948106
firstReactRender312476123174
getState127146151219
initialActions001001
loadScripts1308118916069013291526
setupStore17692171364
numNetworkReqs1367118767
WebpackPower User HomeuiStartup23361878345945226303459
load15411299189721818241897
domContentLoaded15411299189721818241897
domInteractive18038459143397459
firstPaint------
backgroundConnect1233832296166322
firstReactRender46356795367
getState1558538376204383
initialActions107217
loadScripts14851278183220817561832
setupStore3471233762123
numNetworkReqs1356532492226324
📊 Page Load Benchmark Results

Current Commit: 5d75564 | Date: 11/12/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±40ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 710ms (±37ms) 🟢 | historical mean value: 728ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 40ms 995ms 1.32s 1.04s 1.32s
domContentLoaded 710ms 37ms 689ms 993ms 729ms 993ms
firstPaint 75ms 11ms 60ms 168ms 84ms 168ms
firstContentfulPaint 75ms 11ms 60ms 168ms 84ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 68 Bytes (0%)
  • ui: 611 Bytes (0.01%)
  • common: 86 Bytes (0%)

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

A couple of comments.

@mcmire
Copy link
Contributor

mcmire commented Nov 12, 2025

@cryptodev-2s We should make sure to add the new event to the segment-schema repo as well. There are some instructions for making a PR there: https://github.com/Consensys/segment-schema

@cryptodev-2s cryptodev-2s requested a review from mcmire November 12, 2025 19:34
@cryptodev-2s cryptodev-2s force-pushed the metrics/track-network-banner-rpc-updated branch from fb5a202 to f4cd43d Compare November 12, 2025 19:53
@metamaskbot
Copy link
Collaborator

Builds ready [f4cd43d]
UI Startup Metrics (1195 ± 85 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1195106914878512321350
load103391813128010791182
domContentLoaded102791513057910751171
domInteractive211495141760
firstPaint59184124440710271138
backgroundConnect2272142496229238
firstReactRender24174452536
getState21891112538
initialActions003001
loadScripts806691107479849949
setupStore1062731116
numNetworkReqs1367519672
BrowserifyPower User HomeuiStartup16771477236225219362362
load1058907168120512271681
domContentLoaded1046900161619412171616
domInteractive39151063688106
firstPaint61215316654509511665
backgroundConnect24622130423259304
firstReactRender29243833138
getState17112520318184203
initialActions001011
loadScripts81368313521849831352
setupStore15103171331
numNetworkReqs1607532795246327
WebpackStandard HomeuiStartup8267021176888291024
load61055897480604819
domContentLoaded60354895176600806
domInteractive171282121445
firstPaint20859955198202637
backgroundConnect251175152657
firstReactRender29186683438
getState1162931317
initialActions001001
loadScripts60054594173598795
setupStore1162231318
numNetworkReqs1367419872
WebpackPower User HomeuiStartup1081877160424612851604
load64657191394706913
domContentLoaded62855887385690873
domInteractive321396307196
firstPaint40276876270615876
backgroundConnect611020167161201
firstReactRender27243222832
getState1459018324156183
initialActions001011
loadScripts62455786282680862
setupStore116318931
numNetworkReqs1307222562208225
FirefoxBrowserifyStandard HomeuiStartup14751302200513015201745
load1247112115469212901449
domContentLoaded1246112115459212901448
domInteractive1103532454108238
firstPaint------
backgroundConnect4323133204998
firstReactRender26215952738
getState1174561120
initialActions0022211
loadScripts1220110015198712611417
setupStore1276171227
numNetworkReqs1267215759
BrowserifyPower User HomeuiStartup21841787312840425883128
load14091157192723316421927
domContentLoaded14091157192723316401927
domInteractive20647566190470566
firstPaint------
backgroundConnect952926977159269
firstReactRender42305884858
getState1458233474181334
initialActions20297129
loadScripts13751138181621916091816
setupStore28694294694
numNetworkReqs1366932188222321
WebpackStandard HomeuiStartup16791473243615817262033
load14171245185612014591681
domContentLoaded14171245185512014591681
domInteractive1043539557110205
firstPaint------
backgroundConnect54271983057129
firstReactRender352588123678
getState168214271220
initialActions001001
loadScripts13821213175011314341620
setupStore196224261670
numNetworkReqs1366917865
WebpackPower User HomeuiStartup21921847307431023043074
load14931254175117316821751
domContentLoaded14931254175017316811750
domInteractive15644527141278527
firstPaint------
backgroundConnect74272446572244
firstReactRender49331021855102
getState1409627944164279
initialActions101011
loadScripts14651236172517216641725
setupStore3661814359181
numNetworkReqs1346630879231308
📊 Page Load Benchmark Results

Current Commit: f4cd43d | Date: 11/12/2025

📄 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 (±58ms) 🟢 | historical mean value: 726ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 88ms (±124ms) 🟢 | historical mean value: 79ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 43ms 1.01s 1.39s 1.04s 1.39s
domContentLoaded 720ms 58ms 695ms 1.26s 728ms 1.26s
firstPaint 88ms 124ms 60ms 1.32s 88ms 1.32s
firstContentfulPaint 88ms 124ms 60ms 1.32s 88ms 1.32s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 570 Bytes (0.01%)
  • common: 96 Bytes (0%)

@cryptodev-2s
Copy link
Contributor Author

@cryptodev-2s We should make sure to add the new event to the segment-schema repo as well. There are some instructions for making a PR there: https://github.com/Consensys/segment-schema

Done here https://github.com/Consensys/segment-schema/pull/366

@cryptodev-2s
Copy link
Contributor Author

cryptodev-2s commented Nov 13, 2025

@mcmire Right now we only send rpc_endpoint_url for the new RPC. I’m adding a second property to include the previous RPC URL as well, so we can easily track the ‘from → to’ transition without needing more complex aggregations.

@cryptodev-2s cryptodev-2s force-pushed the metrics/track-network-banner-rpc-updated branch from f4cd43d to c19334f Compare November 18, 2025 10:18
@metamaskbot
Copy link
Collaborator

Builds ready [c19334f]
UI Startup Metrics (1237 ± 113 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12371060161911312961443
load1079918148510611361274
domContentLoaded1072914147710611301268
domInteractive2314129181866
firstPaint71292148343310871255
backgroundConnect2342182889237246
firstReactRender27205252835
getState22872122549
initialActions106112
loadScripts84569412501059041037
setupStore1062631116
numNetworkReqs1367119670
BrowserifyPower User HomeuiStartup21661773292328722902923
load1130962153820713891538
domContentLoaded1110944152720813491527
domInteractive591720259125202
firstPaint534188157238410141572
backgroundConnect25023527810258278
firstReactRender77481322291132
getState23316331148271311
initialActions102112
loadScripts884724130320611301303
setupStore251353102853
numNetworkReqs1269420639153206
WebpackStandard HomeuiStartup85772712901048581122
load624569103193618897
domContentLoaded617563101289611872
domInteractive181279151557
firstPaint185581015197176752
backgroundConnect261073142859
firstReactRender3420255243742
getState1163441319
initialActions104111
loadScripts614561100287609862
setupStore1263951321
numNetworkReqs1367119869
WebpackPower User HomeuiStartup1065904175825512351758
load657566964137687964
domContentLoaded642555918126675918
domInteractive36121684256168
firstPaint33095965311678965
backgroundConnect55102085885208
firstReactRender39384314043
getState1429816219150162
initialActions101011
loadScripts638553908123664908
setupStore96244924
numNetworkReqs78621312088131
FirefoxBrowserifyStandard HomeuiStartup14301299198512414461772
load1202111715327812261380
domContentLoaded1202111715327812251380
domInteractive51323334441155
firstPaint------
backgroundConnect382587124661
firstReactRender26225042635
getState1277891023
initialActions207122
loadScripts1180109915057511981352
setupStore156220281129
numNetworkReqs1266415755
BrowserifyPower User HomeuiStartup33732632460662839304606
load15521314204722017402047
domContentLoaded15511313204722017402047
domInteractive24073628179464628
firstPaint------
backgroundConnect634152139641610121396
firstReactRender956113622119136
getState1637026147202261
initialActions214134
loadScripts15041286197922117011979
setupStore11016447101134447
numNetworkReqs1277123558212235
WebpackStandard HomeuiStartup16131447198412116421930
load1374121716349814261584
domContentLoaded1374121716329814261584
domInteractive55281943160127
firstPaint------
backgroundConnect4625109195194
firstReactRender332589103442
getState1275171225
initialActions103122
loadScripts1345119415929313981544
setupStore177187231454
numNetworkReqs1266616763
WebpackPower User HomeuiStartup32842609439755138604397
load16811447209022219792090
domContentLoaded16811446209022219792090
domInteractive23976719212509719
firstPaint------
backgroundConnect46516710802596851080
firstReactRender916413822111138
getState17711438564210385
initialActions213123
loadScripts16301387204722919412047
setupStore12044503110120503
numNetworkReqs1287324557173245
📊 Page Load Benchmark Results

Current Commit: c19334f | Date: 11/18/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±126ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±124ms) 🟢 | historical mean value: 730ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 86ms (±104ms) 🟢 | historical mean value: 80ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 126ms 1.01s 2.27s 1.06s 2.27s
domContentLoaded 732ms 124ms 700ms 1.94s 745ms 1.94s
firstPaint 86ms 104ms 60ms 1.12s 84ms 1.12s
firstContentfulPaint 86ms 104ms 60ms 1.12s 84ms 1.12s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 53 Bytes (0%)
  • ui: 570 Bytes (0.01%)
  • common: 96 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [6f5bd3d]
UI Startup Metrics (1243 ± 98 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1243107015219813011425
load106788613259711281246
domContentLoaded106088213199611221238
domInteractive2414175232078
firstPaint630105132442610621202
backgroundConnect2342172649238254
firstReactRender3420119133956
getState25789112943
initialActions106113
loadScripts8326591089958881019
setupStore1263751320
numNetworkReqs1367219669
BrowserifyPower User HomeuiStartup22101892326032824003260
load1174977202528514252025
domContentLoaded1156958200728714112007
domInteractive611920861134208
firstPaint573123160446310091604
backgroundConnect25323729615261296
firstReactRender77521271990127
getState25318732042306320
initialActions103123
loadScripts922727172927611741729
setupStore281858103158
numNetworkReqs1249718330171183
WebpackStandard HomeuiStartup8697151265999041040
load628559102784629815
domContentLoaded621553100781623802
domInteractive191288161660
firstPaint224561010224220754
backgroundConnect261262123057
firstReactRender3720244313967
getState1262231418
initialActions104111
loadScripts61855199678620791
setupStore1263551521
numNetworkReqs1367219869
WebpackPower User HomeuiStartup1109924184329113421843
load686584985150910985
domContentLoaded671572942141891942
domInteractive391312343101123
firstPaint35169945314583945
backgroundConnect54112416779241
firstReactRender42384624346
getState1489620127162201
initialActions101011
loadScripts667570932137881932
setupStore96245824
numNetworkReqs846413226118132
FirefoxBrowserifyStandard HomeuiStartup14081248206113014341708
load1193108415699812101429
domContentLoaded1192108315699812091428
domInteractive49341672652122
firstPaint------
backgroundConnect4023132204291
firstReactRender25214752540
getState1062441020
initialActions213122
loadScripts1168106814618711851401
setupStore1375191532
numNetworkReqs1467820776
BrowserifyPower User HomeuiStartup30482575372228932173722
load15101274184018516591840
domContentLoaded15101274184018516591840
domInteractive25270608195382608
firstPaint------
backgroundConnect569127961301907961
firstReactRender80551021390102
getState15146495161140495
initialActions213133
loadScripts14591214178618916261786
setupStore672012836114128
numNetworkReqs1308124056176240
WebpackStandard HomeuiStartup16201465198812716371965
load1375120216889813961602
domContentLoaded1374120116889813951601
domInteractive54301262364101
firstPaint------
backgroundConnect4727118195491
firstReactRender342680113467
getState147173201225
initialActions216122
loadScripts1345118416359313691564
setupStore156104141450
numNetworkReqs1366817863
WebpackPower User HomeuiStartup34012690441558441414415
load16971450217123819632171
domContentLoaded16971450217123819632171
domInteractive22073666192482666
firstPaint------
backgroundConnect50412212023308531202
firstReactRender876313421100134
getState17411347987162479
initialActions213023
loadScripts16481409212623819102126
setupStore14034545125138545
numNetworkReqs1307923556189235
📊 Page Load Benchmark Results

Current Commit: 6f5bd3d | Date: 11/18/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

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

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 40ms 1.00s 1.33s 1.05s 1.33s
domContentLoaded 716ms 37ms 692ms 991ms 740ms 991ms
firstPaint 76ms 13ms 56ms 192ms 84ms 192ms
firstContentfulPaint 76ms 13ms 56ms 192ms 84ms 192ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 53 Bytes (0%)
  • ui: 641 Bytes (0.01%)
  • common: 96 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [46d1cb1]
UI Startup Metrics (1247 ± 92 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1247109814739213031419
load107091212858711311218
domContentLoaded106389812818711261212
domInteractive231492162172
firstPaint64183129542110561195
backgroundConnect2352182779238255
firstReactRender3219138173554
getState24883122949
initialActions106113
loadScripts835676105086900977
setupStore1263341321
numNetworkReqs1367619669
BrowserifyPower User HomeuiStartup21561850294126022252941
load1139939170921814111709
domContentLoaded1121925170121913821701
domInteractive541815748112157
firstPaint57084145238610161452
backgroundConnect25123227311258273
firstReactRender82501322294132
getState23916937163306371
initialActions102122
loadScripts889707143921211481439
setupStore26153663136
numNetworkReqs1218919128153191
WebpackStandard HomeuiStartup8567281216988641133
load62256798184618872
domContentLoaded61556295179611860
domInteractive181170131553
firstPaint20456954190201722
backgroundConnect261285142861
firstReactRender32205483747
getState1161831316
initialActions102111
loadScripts61256094077608849
setupStore1263551423
numNetworkReqs1367519671
WebpackPower User HomeuiStartup1067919156822712091568
load66357010891357551089
domContentLoaded639559977107738977
domInteractive321393317993
firstPaint27776981275580981
backgroundConnect501117159114171
firstReactRender41374724247
getState1397216025153160
initialActions101011
loadScripts635557967104728967
setupStore16630102630
numNetworkReqs826413126123131
FirefoxBrowserifyStandard HomeuiStartup14851313197612015061761
load1249112315258312771432
domContentLoaded1248112315258312761432
domInteractive58333194557165
firstPaint------
backgroundConnect392588124568
firstReactRender29237292850
getState1174341119
initialActions103122
loadScripts1225110714588012531408
setupStore1275971125
numNetworkReqs1266615757
BrowserifyPower User HomeuiStartup32062271462272040194622
load15201293194321017481943
domContentLoaded15201293194321017471943
domInteractive23981623192485623
firstPaint------
backgroundConnect5467014254067761425
firstReactRender865812919103129
getState18210735266210352
initialActions40317331
loadScripts14651247191121917211911
setupStore10829443100130443
numNetworkReqs1267524366233243
WebpackStandard HomeuiStartup16091444199713016381965
load1368122316469913961627
domContentLoaded13681223164610013961627
domInteractive55291622564108
firstPaint------
backgroundConnect4820133225396
firstReactRender332582113661
getState1264961219
initialActions103122
loadScripts1338120516079113671549
setupStore176143211264
numNetworkReqs1366817765
WebpackPower User HomeuiStartup35612552470161540144701
load17761487212824120732128
domContentLoaded17761487212824120732128
domInteractive25296678188452678
firstPaint------
backgroundConnect64012510893229261089
firstReactRender926111617107116
getState18713030248217302
initialActions223033
loadScripts16981445210722719442107
setupStore1013741786105417
numNetworkReqs1267724059190240
📊 Page Load Benchmark Results

Current Commit: 46d1cb1 | Date: 11/18/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±37ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 711ms (±35ms) 🟢 | historical mean value: 730ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 74ms (±13ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 37ms 1.00s 1.29s 1.04s 1.29s
domContentLoaded 711ms 35ms 693ms 965ms 733ms 965ms
firstPaint 74ms 13ms 56ms 180ms 84ms 180ms
firstContentfulPaint 74ms 13ms 56ms 180ms 84ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 53 Bytes (0%)
  • ui: 704 Bytes (0.01%)
  • common: 96 Bytes (0%)

Add NetworkConnectionBannerRpcUpdated event to track when users
complete the RPC update flow initiated from the connection banner.

Includes chain_id_caip and rpc_endpoint_url properties.
selectedRpcEndpoint cannot be undefined here because:
- Save button is disabled without rpcEndpoints
- trackRpcUpdateFromBanner only set for existing networks
- Existing networks always have valid RPC endpoints
Change from single rpc_endpoint_url to from_rpc_domain and to_rpc_domain
properties to track the complete migration path when users switch RPCs
from the network connection banner.

This enables analytics to identify:
- Which RPC endpoints are problematic (high from_rpc_domain counts)
- Which RPC endpoints users prefer (high to_rpc_domain counts)
- Common migration patterns (FROM → TO pairs)
- Use optional chaining for existingNetwork.rpcEndpoints
- Return 'unknown' for missing/corrupted from_rpc_domain
- Add test for corrupted state scenario

This prevents crashes if existingNetwork lacks rpcEndpoints while
still capturing analytics data to identify data integrity issues.
@cryptodev-2s cryptodev-2s force-pushed the metrics/track-network-banner-rpc-updated branch from 46d1cb1 to 0704976 Compare November 18, 2025 14:50
@metamaskbot
Copy link
Collaborator

Builds ready [0704976]
UI Startup Metrics (1230 ± 95 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1230107316509512881395
load106093014098911321202
domContentLoaded105392414028911191196
domInteractive231591171972
firstPaint67988120041010631174
backgroundConnect2332203019235244
firstReactRender30205583445
getState23977112739
initialActions106113
loadScripts827697116788894972
setupStore1163751223
numNetworkReqs1367519670
BrowserifyPower User HomeuiStartup21051797244717622272447
load1143978155319013661553
domContentLoaded1124960154419413561544
domInteractive651923865138238
firstPaint779144156944410311569
backgroundConnect24923727212251272
firstReactRender72491322081132
getState21816232646258326
initialActions103113
loadScripts896740131419211271314
setupStore2263072830
numNetworkReqs1249519030156190
WebpackStandard HomeuiStartup82768411731028291096
load58553394685579831
domContentLoaded57852890380572805
domInteractive191299171562
firstPaint21356911210183803
backgroundConnect271277133058
firstReactRender3420214203748
getState1162431217
initialActions103111
loadScripts57552689578569797
setupStore1262941420
numNetworkReqs1467419869
WebpackPower User HomeuiStartup1081894165325914121653
load661569983138848983
domContentLoaded642559895121812895
domInteractive341399358699
firstPaint33667868285586868
backgroundConnect60922674155226
firstReactRender41385134151
getState1369015020149150
initialActions101011
loadScripts638557885118802885
setupStore1162471524
numNetworkReqs836313427124134
FirefoxBrowserifyStandard HomeuiStartup15131347190412215651792
load1272114815609413321453
domContentLoaded1272114815609413321453
domInteractive55341863457157
firstPaint------
backgroundConnect41241252043102
firstReactRender28235462843
getState147180191124
initialActions203123
loadScripts1247112914778813121422
setupStore1375791332
numNetworkReqs1266415758
BrowserifyPower User HomeuiStartup34352346478969140944789
load15501316198223118451982
domContentLoaded15501316198223118451982
domInteractive24283614172343614
firstPaint------
backgroundConnect718129135238511151352
firstReactRender89671301497130
getState192120534107181534
initialActions213133
loadScripts15061278194822917101948
setupStore13434501109183501
numNetworkReqs1287223561227235
WebpackStandard HomeuiStartup15391365218813115521900
load1313117516569713371568
domContentLoaded1313117516559713361568
domInteractive53291512659114
firstPaint------
backgroundConnect44231222149104
firstReactRender322382103459
getState1275091248
initialActions2013123
loadScripts1284115915778713141497
setupStore175233271366
numNetworkReqs1366717764
WebpackPower User HomeuiStartup31692499408445535634084
load16311434193917818821939
domContentLoaded16311434193817718811938
domInteractive21363522151409522
firstPaint------
backgroundConnect40215410532686421053
firstReactRender82631071293107
getState17610736460187364
initialActions217127
loadScripts15711384190017017561900
setupStore912613531119135
numNetworkReqs1327224263229242
📊 Page Load Benchmark Results

Current Commit: 0704976 | Date: 11/18/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±45ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 724ms (±65ms) 🟢 | historical mean value: 730ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±42ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 45ms 1.01s 1.35s 1.06s 1.35s
domContentLoaded 724ms 65ms 699ms 1.30s 744ms 1.30s
firstPaint 79ms 42ms 60ms 496ms 88ms 496ms
firstContentfulPaint 79ms 42ms 60ms 496ms 88ms 496ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 53 Bytes (0%)
  • ui: 704 Bytes (0.01%)
  • common: 96 Bytes (0%)

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Tested and LGTM.

@cryptodev-2s cryptodev-2s added this pull request to the merge queue Nov 19, 2025
Merged via the queue into main with commit 9f36182 Nov 19, 2025
174 checks passed
@cryptodev-2s cryptodev-2s deleted the metrics/track-network-banner-rpc-updated branch November 19, 2025 10:42
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
@metamaskbot metamaskbot added the release-13.11.0 Issue or pull request that will be included in release 13.11.0 label Nov 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.11.0 Issue or pull request that will be included in release 13.11.0 size-M team-core-platform Core Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants