-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Cherry pick 2 metric PRs for Blockaid #23022
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
## **Description** Various updates related to Blockaid metrics ### Fixes - Remove duplicate SignatureRequested SIWE event - related: #21955) - Removes `security_alert_response` and `security_alert_reason` transaction, event fragment prop if unnecessary. Previously would add "not applicable" values to all transaction metrics. ### Feat - Add 'external_link_clicked' transaction fragment prop - Add `security_alert_failed ` ui_customization metric prop - Removes ExternalLinkClicked from "Report an issue" click - related: #22667 - Add test coverage: - utils/metrics: - test not applicable resultType and reason - test when type is failed, malicious, and benign ### Cleanup - removes current MetaMetricsEventName.ExternalLinkClicked / onSupportLinkClicked metric events for Blockaid - adds external_link_clicked fragment prop to transaction metrics related to Blockaid - `let uiCustomizations` → `const uiCustomizations = [];` - other various cleanup e.g.: - rename variables - update test phrases ## **Related issues** Fixes: MetaMask/MetaMask-planning#1756 ## **Manual testing steps** ## **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** - [ ] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've clearly explained what problem this PR is solving and how it is solved. - [ ] I've linked related issues - [ ] I've included manual testing steps - [ ] I've included screenshots/recordings if applicable - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [ ] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **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.
## **Description** With the new async ppom changes, we don't see any more the metrics information for any Signature (eth_sign, typed signature) and we are now also missing the ppom request count to Infura for Transactions and Signatures. We should see it in Transaction/Signature Confirmed/Rejected. ## **Related issues** Fixes: #22840 #22841 ## **Manual testing steps** 1. Enable Blockaid 2. Trigger any Signature/Transaction 3. See Metrics 4. Accept/Reject the Signature/Transaction 5. See Metrics in network info ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before**   ### **After** <img width="1222" alt="Screenshot 2024-02-08 at 14 08 51" src="https://github.com/MetaMask/metamask-extension/assets/44811/75fd3d07-76a6-404d-856b-ac757169824f"> <img width="1227" alt="Screenshot 2024-02-08 at 14 08 28" src="https://github.com/MetaMask/metamask-extension/assets/44811/7511a78c-0ec3-4840-b851-6693e81aa67e"> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [x] I've linked related issues - [x] I've included manual testing steps - [x] I've included screenshots/recordings if applicable - [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/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. - [x] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [x] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **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. --------- Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com> Co-authored-by: Jyoti Puri <jyotipuri@gmail.com>
|
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. |
|
🟢 The issue that I was seeing previously is gone fix-working-metrics.mp4About the new added commit: 🟢 The external link click is also working external-link-clicked.mp4🟢 SIWE duplicated events are also fixed duplicate-siwe-fix.mp4I've found a minor issue with the case of failed validations (that display benign and loading, instead of validation failed), but that could be fixed in a separate PR and it's not a blocker for the release. I can open a separate ticket for that cc @bschorchit @danjm validation-failed-marked-benign-loading.mp4 |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## Version-v11.10.0 #23022 +/- ##
====================================================
+ Coverage 68.00% 68.03% +0.04%
====================================================
Files 1087 1087
Lines 42898 42892 -6
Branches 11399 11406 +7
====================================================
+ Hits 29169 29181 +12
+ Misses 13729 13711 -18 ☔ View full report in Codecov by Sentry. |
|
merging as per Dan's comment
|
Builds ready [9c391ca]
Page Load Metrics (796 ± 26 ms)
|

Description
Cherry picks:
2f5e64c
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist