Skip to content

feat: add rpc_method_name, type and retry_reason to degraded RPC endpoint Segment events#40176

Merged
cryptodev-2s merged 9 commits intomainfrom
add-rpc-method-name-to-degraded-events
Feb 19, 2026
Merged

feat: add rpc_method_name, type and retry_reason to degraded RPC endpoint Segment events#40176
cryptodev-2s merged 9 commits intomainfrom
add-rpc-method-name-to-degraded-events

Conversation

@cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Feb 17, 2026

Description

Add rpc_method_name, type and retry_reason to the RPC Service Degraded Segment events. This lets us identify which JSON-RPC methods produce the most slow requests or retry exhaustions, enabling better debugging of RPC endpoint health issues.

Consumes the new rpcMethodName, type and retryReason field added to NetworkController:rpcEndpointDegraded events in @metamask/network-controller (core PR #7954, #7988).

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

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

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

Medium Risk
Primarily telemetry/schema changes, but the @metamask/network-controller major-version bump plus LavaMoat policy updates could affect runtime behavior or bundling if any dependency allowances are incorrect.

Overview
NetworkController:rpcEndpointDegraded handling is updated to consume new event fields and emit richer RPC Service Degraded Segment properties: rpc_method_name, degradation type (e.g. slow success vs retries exhausted), and optional retry_reason.

This bumps @metamask/network-controller to ^30.0.0 (with related lockfile updates) and updates LavaMoat policies to reflect the new dependency graph/package nesting; tests are adjusted to assert the new telemetry properties.

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

@cryptodev-2s cryptodev-2s requested a review from mcmire February 17, 2026 19:13
@cryptodev-2s cryptodev-2s self-assigned this Feb 17, 2026
@cryptodev-2s cryptodev-2s added the team-core-platform Core Platform team label Feb 17, 2026
@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.

@cryptodev-2s cryptodev-2s marked this pull request as ready for review February 17, 2026 19:16
@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policy update failed. You can review the logs or retry the policy update here

@cryptodev-2s cryptodev-2s force-pushed the add-rpc-method-name-to-degraded-events branch from dcd28d1 to 401bcb5 Compare February 17, 2026 19:50
@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-policies

@socket-security
Copy link

socket-security bot commented Feb 17, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​controller-utils@​11.18.0 ⏵ 11.19.09910077 +195 +4100
Updated@​metamask/​json-rpc-engine@​10.2.1 ⏵ 10.2.29910010091 +2100
Added@​metamask/​network-controller@​30.0.0100100100100100

View full report

@metamaskbot
Copy link
Collaborator

Policy update failed. You can review the logs or retry the policy update here

@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot metamaskbot requested a review from a team as a code owner February 17, 2026 20:35
@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/experimental/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/flask/policy.json changes differ from main/policy.json policy changes
✅ lavamoat/webpack/mv2/beta/policy.json changes match mv2/main/policy.json policy changes
✅ lavamoat/webpack/mv2/experimental/policy.json changes match mv2/main/policy.json policy changes
✅ lavamoat/webpack/mv2/flask/policy.json changes match mv2/main/policy.json policy changes
✅ lavamoat/webpack/mv3/beta/policy.json changes match mv3/main/policy.json policy changes
✅ lavamoat/webpack/mv3/experimental/policy.json changes match mv3/main/policy.json policy changes
✅ lavamoat/webpack/mv3/flask/policy.json changes match mv3/main/policy.json policy changes

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 17, 2026

✨ Files requiring CODEOWNER review ✨

📜 @MetaMask/policy-reviewers (8 files, +364 -16)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +90 -3
      • 📁 experimental/
        • 📄 policy.json +90 -3
      • 📁 flask/
        • 📄 policy.json +90 -3
      • 📁 main/
        • 📄 policy.json +90 -3
    • 📁 webpack/
      • 📁 mv2/
        • 📁 beta/
          • 📄 policy.json +1 -1
        • 📁 experimental/
          • 📄 policy.json +1 -1
        • 📁 flask/
          • 📄 policy.json +1 -1
        • 📁 main/
          • 📄 policy.json +1 -1

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 17, 2026

Builds ready [617720a]
UI Startup Metrics (1399 ± 90 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1399123116509014261579
load1205103114608312341363
domContentLoaded1200102814398212301355
domInteractive271694182479
firstPaint157691067118204291
backgroundConnect25523447725255284
firstReactRender17115261825
initialActions104112
loadScripts9617901196819941115
setupStore1363151521
numNetworkReqs221585191579
BrowserifyPower User HomeuiStartup2572140710820180324084654
load12521057192318213021715
domContentLoaded12321051180517312821689
domInteractive38202163335121
firstPaint1927752896260352
backgroundConnect950300853015814582410
firstReactRender24155272638
initialActions104112
loadScripts972801151316310141392
setupStore1575071626
numNetworkReqs1164825043134197
WebpackStandard HomeuiStartup87970212581179561073
load7706311177113845963
domContentLoaded7646271171112840956
domInteractive2817123202481
firstPaint1216575282135208
backgroundConnect281882113149
firstReactRender15103641822
initialActions103112
loadScripts7616251169111834954
setupStore1273651319
numNetworkReqs231587211584
WebpackPower User HomeuiStartup1292931245622413741629
load74964011361137431051
domContentLoaded73863411271147311044
domInteractive41191833241123
firstPaint1467141873165301
backgroundConnect187135997122166360
firstReactRender23173732429
initialActions103111
loadScripts73563211181117291036
setupStore1344451423
numNetworkReqs1294527447151217
FirefoxBrowserifyStandard HomeuiStartup15531341216717916081955
load13441173195215214071615
domContentLoaded13421173194715114071615
domInteractive70323135086149
firstPaint------
backgroundConnect5526203245886
firstReactRender1292421315
initialActions102012
loadScripts13171151192514913741579
setupStore176156241354
numNetworkReqs241490211784
BrowserifyPower User HomeuiStartup28362113799162530013408
load15901319619650415741984
domContentLoaded15901319619650415741983
domInteractive14935605119162424
firstPaint------
backgroundConnect46913013553457371166
firstReactRender20146492034
initialActions2041422
loadScripts15491287614750215261941
setupStore1589798192202551
numNetworkReqs853818633101153
WebpackStandard HomeuiStartup15701351207512816141848
load13701185172310014221549
domContentLoaded13701185172310014221549
domInteractive762930846116143
firstPaint------
backgroundConnect53252723457104
firstReactRender13112721317
initialActions102012
loadScripts1347116916999713931513
setupStore12570121045
numNetworkReqs241294191784
WebpackPower User HomeuiStartup27962040871669429503547
load15821290703858115891992
domContentLoaded15811290703858115881991
domInteractive15033826145141489
firstPaint------
backgroundConnect40712512913184771099
firstReactRender22166072430
initialActions213122
loadScripts15401266698657715211966
setupStore1369821165137550
numNetworkReqs82372344189154
📊 Page Load Benchmark Results

Current Commit: 617720a | Date: 2/17/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.09s (±59ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 772ms (±56ms) 🟢 | historical mean value: 730ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 86ms (±13ms) 🟢 | historical mean value: 83ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.09s 59ms 1.06s 1.43s 1.15s 1.43s
domContentLoaded 772ms 56ms 744ms 1.09s 820ms 1.09s
firstPaint 86ms 13ms 72ms 200ms 96ms 200ms
firstContentfulPaint 86ms 13ms 72ms 200ms 96ms 200ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -49.27 KiB (-1.14%)
  • ui: 5 Bytes (0%)
  • common: 414 Bytes (0%)

@cryptodev-2s cryptodev-2s changed the title feat: add rpcMethodName to degraded and unavailable RPC endpoint Segment events feat: add rpcMethodName to degraded RPC endpoint Segment events Feb 18, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 18, 2026

Builds ready [106ae41]
UI Startup Metrics (1414 ± 103 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14141231166510314851605
load1223105014499512781386
domContentLoaded1216104614419512721381
domInteractive2917140202678
firstPaint184701335200208342
backgroundConnect25823535619260297
firstReactRender1911203191928
initialActions104112
loadScripts97479311839610351148
setupStore157127121722
numNetworkReqs231587201583
BrowserifyPower User HomeuiStartup17851394235617518292237
load12021057180817111791728
domContentLoaded11851050175416111631667
domInteractive3618140243590
firstPaint193791718172241316
backgroundConnect34929946028362408
firstReactRender23154362538
initialActions105112
loadScripts91779614731568951370
setupStore1684161928
numNetworkReqs1144826646141219
WebpackStandard HomeuiStartup87471412481079511039
load752628100194832900
domContentLoaded74662399694822893
domInteractive2916116212580
firstPaint1196538259143210
backgroundConnect291797113345
firstReactRender15113541822
initialActions104112
loadScripts74462298893819888
setupStore1263851323
numNetworkReqs231589201581
WebpackPower User HomeuiStartup1255874204118013341557
load72162912631157141010
domContentLoaded71262212561157031003
domInteractive3619183293494
firstPaint147681101116178283
backgroundConnect16213039246162237
firstReactRender23173232529
initialActions103111
loadScripts7106201245113701993
setupStore1243951418
numNetworkReqs93472464698228
FirefoxBrowserifyStandard HomeuiStartup16141422270819716392008
load14001194229716714371711
domContentLoaded13991188229216714351711
domInteractive72352834197139
firstPaint------
backgroundConnect5630134156280
firstReactRender13102821314
initialActions103122
loadScripts13741168221016214141678
setupStore146188191233
numNetworkReqs231286191778
BrowserifyPower User HomeuiStartup27132028395439928263604
load15871283238228016572240
domContentLoaded15871283238228016572240
domInteractive11336779113109299
firstPaint------
backgroundConnect30264969261318897
firstReactRender201473112028
initialActions203122
loadScripts15491261235926916032193
setupStore1568773214161674
numNetworkReqs67381463290137
WebpackStandard HomeuiStartup16661425302619317231920
load14471247279016815041614
domContentLoaded14471247279016815041614
domInteractive873022747131168
firstPaint------
backgroundConnect7427140413868140
firstReactRender15115651520
initialActions102012
loadScripts1406122615939514791543
setupStore13690111234
numNetworkReqs231389171867
WebpackPower User HomeuiStartup27421955411745329563607
load16081285246629117862226
domContentLoaded16071284246629117862226
domInteractive11831685132106432
firstPaint------
backgroundConnect2741221349228236892
firstReactRender23167092430
initialActions103122
loadScripts15651269243527417412110
setupStore19571161273180724
numNetworkReqs66371393289132
📊 Page Load Benchmark Results

Current Commit: 106ae41 | Date: 2/18/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±76ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 759ms (±74ms) 🟢 | historical mean value: 730ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±11ms) 🟢 | historical mean value: 83ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 76ms 1.03s 1.37s 1.31s 1.37s
domContentLoaded 759ms 74ms 721ms 1.05s 980ms 1.05s
firstPaint 83ms 11ms 64ms 176ms 96ms 176ms
firstContentfulPaint 83ms 11ms 64ms 176ms 96ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -49.33 KiB (-1.14%)
  • ui: 5 Bytes (0%)
  • common: 292 Bytes (0%)

@cryptodev-2s cryptodev-2s force-pushed the add-rpc-method-name-to-degraded-events branch from 106ae41 to 4bacbe1 Compare February 18, 2026 12:18
@cryptodev-2s
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/experimental/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/flask/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/webpack/mv2/beta/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/experimental/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/flask/policy.json changes differ from mv2/main/policy.json policy changes
✅ lavamoat/webpack/mv3/beta/policy.json changes match mv3/main/policy.json policy changes
✅ lavamoat/webpack/mv3/experimental/policy.json changes match mv3/main/policy.json policy changes
✅ lavamoat/webpack/mv3/flask/policy.json changes match mv3/main/policy.json policy changes

@cryptodev-2s cryptodev-2s force-pushed the add-rpc-method-name-to-degraded-events branch from f731eef to 5b27352 Compare February 19, 2026 20:33
@cryptodev-2s cryptodev-2s force-pushed the add-rpc-method-name-to-degraded-events branch from 4067c57 to 1861770 Compare February 19, 2026 20:50
@cryptodev-2s cryptodev-2s requested a review from mcmire February 19, 2026 20:51
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.

LGTM.

languageName: node
linkType: hard

"@metamask/network-controller@npm:^30.0.0":
Copy link
Contributor

Choose a reason for hiding this comment

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

There are now three different versions of network-controller in the dependency tree. We may want to encourage other teams to upgrade their packages. But that can happen outside of this PR.

@cryptodev-2s cryptodev-2s changed the title feat: add rpc_method_name, degraded_event_type and retry_reason to degraded RPC endpoint Segment events feat: add rpc_method_name, type and retry_reason to degraded RPC endpoint Segment events Feb 19, 2026
Copy link
Member

@Mrtenz Mrtenz left a comment

Choose a reason for hiding this comment

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

Policy changes look fine to me. Just introducing a new version of network-controller since some packages still use the previous major.

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 19, 2026

Builds ready [1861770]
UI Startup Metrics (1429 ± 106 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14291184182110614851593
load1222101915229012731380
domContentLoaded121599315128912641371
domInteractive2715103192476
firstPaint175681272169213323
backgroundConnect24522143023246274
firstReactRender19124252029
initialActions104113
loadScripts98977712758910401140
setupStore1365761422
numNetworkReqs312289192286
BrowserifyPower User HomeuiStartup19031353548670518353054
load11651019166313211661548
domContentLoaded11521008165212911561488
domInteractive3518189243485
firstPaint1757039278235327
backgroundConnect4042833141417331604
firstReactRender24146382541
initialActions1010113
loadScripts91478313931239171237
setupStore1676491628
numNetworkReqs62381432269119
WebpackStandard HomeuiStartup92072514131119701128
load7826411084106858951
domContentLoaded7756361078105851945
domInteractive3117120232693
firstPaint1336470685160267
backgroundConnect29206683345
firstReactRender19133962232
initialActions105112
loadScripts7726341075104849943
setupStore1354051424
numNetworkReqs312299212592
WebpackPower User HomeuiStartup1242902253221613251506
load73764813091227261044
domContentLoaded72764213011207161037
domInteractive35181902831101
firstPaint173681152152194338
backgroundConnect1711301136105161271
firstReactRender21173132326
initialActions103111
loadScripts72464012911177141027
setupStore1152131217
numNetworkReqs1113826548135215
FirefoxBrowserifyStandard HomeuiStartup16031357235320516292065
load13541144204017513811698
domContentLoaded13531144203917513801698
domInteractive73313225495140
firstPaint------
backgroundConnect5526197226484
firstReactRender13111911416
initialActions102112
loadScripts13291115200616813571669
setupStore206192311560
numNetworkReqs311994202586
BrowserifyPower User HomeuiStartup27142047395137328493489
load15141224235920415761916
domContentLoaded15141224235820415751916
domInteractive1213452095122335
firstPaint------
backgroundConnect287116940215324863
firstReactRender17142821720
initialActions107122
loadScripts14711204233319415191879
setupStore1678777210175632
numNetworkReqs65301613182123
WebpackStandard HomeuiStartup17721445350133817932045
load14711205280121215171611
domContentLoaded14701201280121215171611
domInteractive942924548132190
firstPaint------
backgroundConnect65232273079116
firstReactRender16133731622
initialActions103122
loadScripts14431193277521114881578
setupStore2571713417120
numNetworkReqs312096172775
WebpackPower User HomeuiStartup27541989810166728793486
load16151232674257317022063
domContentLoaded16151232674257317022063
domInteractive14531821163125553
firstPaint------
backgroundConnect3051171281245292892
firstReactRender22167062430
initialActions213123
loadScripts15841209670957116551995
setupStore18681215268165748
numNetworkReqs64271753489127
📊 Page Load Benchmark Results

Current Commit: 1861770 | Date: 2/19/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±40ms) 🟡 | historical mean value: 1.06s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 727ms (±37ms) 🟢 | historical mean value: 745ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±10ms) 🟢 | historical mean value: 82ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 40ms 1.02s 1.35s 1.07s 1.35s
domContentLoaded 727ms 37ms 705ms 1.01s 753ms 1.01s
firstPaint 79ms 10ms 60ms 164ms 92ms 164ms
firstContentfulPaint 79ms 10ms 60ms 164ms 92ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 48.81 KiB (1.11%)
  • ui: 2 Bytes (0%)
  • common: 98.11 KiB (0.9%)

@cryptodev-2s cryptodev-2s added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit 4d5ad6d Feb 19, 2026
185 checks passed
@cryptodev-2s cryptodev-2s deleted the add-rpc-method-name-to-degraded-events branch February 19, 2026 22:37
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2026
@metamaskbot metamaskbot added the release-13.20.0 Issue or pull request that will be included in release 13.20.0 label Feb 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments