-
Notifications
You must be signed in to change notification settings - Fork 5.5k
chore: Improve metrics for failed network requests #34605
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
Conversation
|
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. |
Currently, we only track when an Infura RPC endpoint becomes degraded or unavailable. Now, we would like to have similar insights about custom RPC endpoints so that we can take more informed decisions to improve reliability for other chains. We'd also like to improve the tracking for Infura endpoints so that we can understand failures better. This commit updates the handlers for the `NetworkController:rpcEndpointDegraded` and `NetworkController:rpcEndpointUnavailable` messenger events so that they create a Segment event regardless of the type of endpoint. The event now includes the HTTP status code. While making these changes, it was noticed that the sampling rate for these Segment event was incorrect. It should have been 1%, not 10%. This has also been corrected. This ensures that we don't store more data in Segment and our downstream services than necessary.
3cc12de to
3682f81
Compare
Builds ready [3682f81]
UI Startup Metrics (1149 ± 72 ms)
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 238 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 13 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 2525 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 391 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 277 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 26 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 210 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 33 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 21 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 32 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 101 exceeds gate value 100 for firefox webpack home mean domInteractive Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 54 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 5 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 1951 exceeds gate value 1935 for firefox webpack home p95 uiStartup Benchmark value 268 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 67 exceeds gate value 49 for firefox webpack home p95 backgroundConnect Benchmark value 65 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 42 exceeds gate value 32 for firefox webpack home p95 getState Benchmark value 14 exceeds gate value 2 for firefox webpack home p95 initialActions Sum of mean exceeds: 238ms | Sum of p95 exceeds: 768.8ms Sum of all benchmark exceeds: 1006.8ms Bundle size diffs [🚀 Bundle size reduced!]
|
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [dad12a4]
UI Startup Metrics (1163 ± 66 ms)
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 236 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 11 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 10 exceeds gate value 7 for chrome webpack home mean initialActions Benchmark value 35 exceeds gate value 32 for chrome webpack home mean setupStore Benchmark value 2515 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 58 exceeds gate value 57 for chrome webpack home p95 domInteractive Benchmark value 398 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 15 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 292 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 26 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 227 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 25 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 12 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 30 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 52 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 3 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 240 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 73 exceeds gate value 49 for firefox webpack home p95 backgroundConnect Benchmark value 62 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 9 exceeds gate value 2 for firefox webpack home p95 initialActions Sum of mean exceeds: 240ms | Sum of p95 exceeds: 725.8ms Sum of all benchmark exceeds: 965.8ms Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [605e602]
UI Startup Metrics (1181 ± 80 ms)
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 241 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 13 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 2207 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 2654 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 391 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 15 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 224 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 201 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 77 exceeds gate value 70 for firefox browserify home p95 backgroundConnect Benchmark value 9 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 29 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 29 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 51 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 230 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 59 exceeds gate value 49 for firefox webpack home p95 backgroundConnect Benchmark value 63 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 41 exceeds gate value 32 for firefox webpack home p95 getState Benchmark value 12 exceeds gate value 2 for firefox webpack home p95 initialActions Benchmark value 54 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 253ms | Sum of p95 exceeds: 786.8ms Sum of all benchmark exceeds: 1039.8ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@metamaskbot update-policies |
Builds ready [2b5387a]
UI Startup Metrics (1165 ± 71 ms)
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 237 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 9 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 18 exceeds gate value 17 for chrome browserify home p95 setupStore Benchmark value 2202 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 8 exceeds gate value 7 for chrome webpack home mean initialActions Benchmark value 2583 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 71 exceeds gate value 57 for chrome webpack home p95 domInteractive Benchmark value 393 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 269 exceeds gate value 195 for chrome webpack home p95 getState Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 291 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 111 exceeds gate value 110 for firefox browserify home mean domInteractive Benchmark value 26 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 1677 exceeds gate value 1660 for firefox browserify home p95 uiStartup Benchmark value 303 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 12 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 33 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 51 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 5 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 15 exceeds gate value 13 for firefox webpack home mean setupStore Benchmark value 246 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 63 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 15 exceeds gate value 2 for firefox webpack home p95 initialActions Benchmark value 38 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 246ms | Sum of p95 exceeds: 962.8ms Sum of all benchmark exceeds: 1208.8ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [7dd109a]
UI Startup Metrics (1174 ± 62 ms)
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 232 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 13 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 2290 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 33 exceeds gate value 29 for chrome webpack home mean getState Benchmark value 2649 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 69 exceeds gate value 57 for chrome webpack home p95 domInteractive Benchmark value 397 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 267 exceeds gate value 195 for chrome webpack home p95 getState Benchmark value 14 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 217 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 56 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 12 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 35 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 52 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 241 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 71 exceeds gate value 49 for firefox webpack home p95 backgroundConnect Benchmark value 66 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 14 exceeds gate value 2 for firefox webpack home p95 initialActions Benchmark value 34 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 342ms | Sum of p95 exceeds: 751.8ms Sum of all benchmark exceeds: 1093.8ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
## **Description** Remove policy override entries for dependencies we no longer use, or for variants that have since been consolidated. [](https://codespaces.new/MetaMask/metamask-extension/pull/34818?quickstart=1) ## **Changelog** CHANGELOG entry: null ## **Related issues** N/A ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
#34837) ## **Description** The purpose of this change is to fix the "Create Release Pull Request" Github action by aligning on [metamask-mobile implementation](https://github.com/MetaMask/metamask-mobile/blob/main/.github/workflows/create-release-pr.yml#L12-L14), which seems to work by passing a tag instead of a branch name to github-tools: - [Successful job on Mobile repo](https://github.com/MetaMask/metamask-mobile/actions/runs/16660661504/job/47156804696) ✅ [](https://codespaces.new/MetaMask/metamask-extension/pull/34837?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
## Version Bump After Release This PR bumps the main branch version from 13.1.0 to 13.2.0 after cutting the release branch. ### Why this is needed: - **Nightly builds**: Each nightly build needs to be one minor version ahead of the current release candidate - **Version conflicts**: Prevents conflicts between nightlies and release candidates - **Platform alignment**: Maintains version alignment between MetaMask mobile and extension - **Update systems**: Ensures nightlies are accepted by app stores and browser update systems ### What changed: - Version bumped from `13.1.0` to `13.2.0` - Platform: `extension` - Files updated by `set-semvar-version.sh` script ### Next steps: This PR should be **manually reviewed and merged by the release manager** to maintain proper version flow. ### Related: - Release version: 13.1.0 - Release branch: Version-v13.1.0 - Platform: extension - Test mode: false --- *This PR was automatically created by the `create-platform-release-pr.sh` script.* Co-authored-by: metamaskbot@users.noreply.github.com <metamaskbot@users.noreply.github.com>
…ferent network` (#34834) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** The spec fails with this error: ``` Error: SyntaxError: Unexpected end of JSON input at fet…ipeoacjioc/js-u.a2b8643f36c2c6f1fc00.js:15544:20), Unexpected end of JSON input at withFixtures (test/e2e/helpers.js:320:13) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Context.<anonymous> (test/e2e/tests/settings/address-book.spec.ts:62:5) ``` The problem is that we are missing a mock for tokens, which then results in that request going to the catch all mock which returns a 200 with empty data. Then when trying to parse the empty data the wallet throws the error. [](https://codespaces.new/MetaMask/metamask-extension/pull/34834?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: #34802 ## **Manual testing steps** 1. `yarn test:e2e:single --browser chrome test/e2e/tests/settings/address-book.spec.ts --leave-running=true` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
…age to edit eth value, baseFee, priorityFee and gas limit - 1559 V2` (#34854) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** The send edit specs start a send flow right after login in. The problem is that if we initiate a transaction before the balance has loaded, the `Continue` button is never enabled, no matter how much we wait on the Confirmation screen. This is a known bug on the wallet side (see [here](#24639)). To mitigate this on the spec side, we should wait for the balance to load before starting any transaction. <img width="1673" height="241" alt="Screenshot from 2025-08-05 08-30-20" src="https://github.com/user-attachments/assets/054d54c0-9ea9-42c2-bb27-30ef990fc9e1" /> <img width="1050" height="812" alt="test-failure-screenshot-1" src="https://github.com/user-attachments/assets/2f7bdff3-fac3-45ba-9ead-a3c4cc75f7f5" /> [](https://codespaces.new/MetaMask/metamask-extension/pull/34854?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: #34853 ## **Manual testing steps** 1. `yarn test:e2e:single --browser chrome test/e2e/tests/transaction/send-edit.spec.js --leave-running=true` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
|
All custom RPC endpoints are being captured in Segment with these changes, which is a privacy violation as it means if the user is using a private server we would know about it. I will look for another strategy for allowlisting the event (perhaps making use of Moving this PR back to draft until that is complete. |
Builds ready [d5d26ad]
UI Startup Metrics (1236 ± 55 ms)
Benchmark value 239 exceeds gate value 10 for chrome browserify home mean backgroundConnect Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 252 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 14 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 40 exceeds gate value 29 for chrome webpack home mean getState Benchmark value 2493 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 70 exceeds gate value 57 for chrome webpack home p95 domInteractive Benchmark value 381 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 290 exceeds gate value 195 for chrome webpack home p95 getState Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 295 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 27 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 204 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 13 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 30 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 1639 exceeds gate value 1615 for firefox webpack home mean uiStartup Benchmark value 102 exceeds gate value 100 for firefox webpack home mean domInteractive Benchmark value 33 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 62 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 7 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 2019 exceeds gate value 1935 for firefox webpack home p95 uiStartup Benchmark value 263 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 76 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 21 exceeds gate value 2 for firefox webpack home p95 initialActions Benchmark value 44 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 314ms | Sum of p95 exceeds: 911.8ms Sum of all benchmark exceeds: 1225.8ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [75e1c81]
UI Startup Metrics (1203 ± 69 ms)
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 252 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 14 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 18 exceeds gate value 17 for chrome browserify home p95 setupStore Benchmark value 2250 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 8 exceeds gate value 7 for chrome webpack home mean initialActions Benchmark value 47 exceeds gate value 32 for chrome webpack home mean setupStore Benchmark value 2517 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 344 exceeds gate value 334 for chrome webpack home p95 firstPaint Benchmark value 387 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 257 exceeds gate value 195 for chrome webpack home p95 getState Benchmark value 11 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 300 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 5 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 237 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 13 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 33 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 1625 exceeds gate value 1615 for firefox webpack home mean uiStartup Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 62 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 5 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 253 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 73 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 14 exceeds gate value 2 for firefox webpack home p95 initialActions Sum of mean exceeds: 356ms | Sum of p95 exceeds: 829.8ms Sum of all benchmark exceeds: 1185.8ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [f937b8b]
UI Startup Metrics (1377 ± 121 ms)
Benchmark value 1165 exceeds gate value 1070 for chrome browserify home mean load Benchmark value 1156 exceeds gate value 1061 for chrome browserify home mean domContentLoaded Benchmark value 22 exceeds gate value 20 for chrome browserify home mean domInteractive Benchmark value 264 exceeds gate value 10 for chrome browserify home mean backgroundConnect Benchmark value 28 exceeds gate value 23 for chrome browserify home mean firstReactRender Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 902 exceeds gate value 830 for chrome browserify home mean loadScripts Benchmark value 1613 exceeds gate value 1365 for chrome browserify home p95 uiStartup Benchmark value 1349 exceeds gate value 1190 for chrome browserify home p95 load Benchmark value 1345 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded Benchmark value 46 exceeds gate value 41 for chrome browserify home p95 domInteractive Benchmark value 1290 exceeds gate value 1180 for chrome browserify home p95 firstPaint Benchmark value 313 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 56 exceeds gate value 45 for chrome browserify home p95 firstReactRender Benchmark value 16 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 1076 exceeds gate value 940 for chrome browserify home p95 loadScripts Benchmark value 19 exceeds gate value 17 for chrome browserify home p95 setupStore Benchmark value 2205 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 34 exceeds gate value 29 for chrome webpack home mean getState Benchmark value 2580 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 390 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 277 exceeds gate value 195 for chrome webpack home p95 getState Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 1414 exceeds gate value 1405 for firefox browserify home mean uiStartup Benchmark value 111 exceeds gate value 110 for firefox browserify home mean domInteractive Benchmark value 30 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 27 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 7 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 249 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 15 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 34 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 1626 exceeds gate value 1615 for firefox webpack home mean uiStartup Benchmark value 106 exceeds gate value 100 for firefox webpack home mean domInteractive Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 61 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 5 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 258 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 77 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 15 exceeds gate value 2 for firefox webpack home p95 initialActions Benchmark value 30 exceeds gate value 28 for firefox webpack home p95 setupStore Sum of mean exceeds: 760ms | Sum of p95 exceeds: 1593.8ms Sum of all benchmark exceeds: 2353.8ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [b829962]
UI Startup Metrics (1218 ± 58 ms)
Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions Benchmark value 259 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 15 exceeds gate value 1.2 for chrome browserify home p95 initialActions Benchmark value 18 exceeds gate value 17 for chrome browserify home p95 setupStore Benchmark value 2260 exceeds gate value 2192 for chrome webpack home mean uiStartup Benchmark value 37 exceeds gate value 29 for chrome webpack home mean getState Benchmark value 2546 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 384 exceeds gate value 370 for chrome webpack home p95 firstReactRender Benchmark value 286 exceeds gate value 195 for chrome webpack home p95 getState Benchmark value 13 exceeds gate value 7 for chrome webpack home p95 initialActions Benchmark value 243 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 30 exceeds gate value 25 for firefox browserify home mean backgroundConnect Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore Benchmark value 204 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 31 exceeds gate value 24 for firefox browserify home p95 getState Benchmark value 13 exceeds gate value 2 for firefox browserify home p95 initialActions Benchmark value 31 exceeds gate value 27 for firefox browserify home p95 setupStore Benchmark value 101 exceeds gate value 100 for firefox webpack home mean domInteractive Benchmark value 30 exceeds gate value 26 for firefox webpack home mean backgroundConnect Benchmark value 60 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions Benchmark value 259 exceeds gate value 156 for firefox webpack home p95 domInteractive Benchmark value 71 exceeds gate value 50 for firefox webpack home p95 firstReactRender Benchmark value 12 exceeds gate value 2 for firefox webpack home p95 initialActions Sum of mean exceeds: 347ms | Sum of p95 exceeds: 801.8ms Sum of all benchmark exceeds: 1148.8ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Currently, we only track when an Infura RPC endpoint becomes degraded or unavailable. Now, we would like to have similar insights about custom RPC endpoints so that we can take more informed decisions to improve reliability for other chains. We'd also like to improve the tracking for Infura endpoints so that we can understand failures better.
This commit updates the handlers for the
NetworkController:rpcEndpointDegradedandNetworkController:rpcEndpointUnavailablemessenger events so that they create a Segment event regardless of the type of endpoint. The event now includes the HTTP status code.While making these changes, it was noticed that the sampling rate for these Segment event was incorrect. It should have been 1%, not 10%. This has also been corrected. This ensures that we don't store more data in Segment and our downstream services than necessary.
Changelog
CHANGELOG entry: null
Related issues
Closes #34213.
Manual testing steps
yarn, runyarn webpack --watch(oryarn start).127.0.0.1:8080. Don't enable it yet, though.mitmproxy.mitmproxy -s <path to your script>in an open terminal session. This will run the proxy server.Creating Segment event "RPC Service Degraded" with {"chain_id_caip":"eip155:59144","rpc_endpoint_url":"linea-mainnet.infura.io","http_status":500}. After a few more minutes, you should seeCreating Segment event "RPC Service Unavailable" with {"chain_id_caip":"eip155:59144","rpc_endpoint_url":"linea-mainnet.infura.io","http_status":500}.{"chain_id_caip":"eip155:324","rpc_endpoint_url":"mainnet.era.zksync.io","http_status":500}.https://flare-api.flare.network/ext/C/rpcas the RPC endpoint.{"chain_id_caip":"eip155:14","rpc_endpoint_url":"flare-api.flare.network","http_status":500}.Screenshots/Recordings
(N/A)
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist