-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add logs on new extension version updates and put them in state logs (#…
…21077) ## **Description** This PR aims to implement logs on new extension version install & first time event. LoggingController logs are intended to extend "State Logs", hence this PR also includes that change. Later, we will also implement `SignatureController` logs on this task: MetaMask/MetaMask-planning#1321 ## **Manual testing steps** I couldn't find a appropriate way to test this manually because `onInstalled` event (my guess) could only triggered by Chrome itself. Tested these but no luck 1. Change package.json versions on dev env back and forth 2. Change dist versions back and forth & use "update" button on chrome extension tab 3. Changed dist version manifest.json manually and "update" button on chrome extension tab These are updating the version of extension which shown in the extension tab (chrome://extensions/) but not triggering the event. But the log exporter works as expected because earlier I made some tests for signatures, here is the exported JSON. [MetaMask state logs.txt](https://github.com/MetaMask/metamask-extension/files/12740832/MetaMask.state.logs.txt) ## **Screenshots/Recordings** N/A ## **Related issues** Fixes #19478 ## **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: - [X] What problem this PR is solving. - [X] How this problem was solved. - [X] How reviewers can test my changes. - [X] I’ve indicated what issue this PR is linked to: Fixes #??? - [X] I’ve included tests if applicable. - [X] I’ve documented any added code. - [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)). - [X] I’ve properly set the pull request status: - [X] 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.
- Loading branch information
Showing
4 changed files
with
98 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// This constant used for event property while logging events by LoggingController | ||
export const LOG_EVENT = { | ||
VERSION_UPDATE: 'Extension version update', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters