Skip to content
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

feat: add account sync analytics & add state helpers #4944

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Nov 19, 2024

Explanation

This PR adds various account syncing improvements.

  • New UserStorageController state keys hasAccountSyncingSyncedAtLeastOnce and isAccountSyncingReadyToBeDispatched
  • onAccountSyncErroneousSituation analytics callback to track how often erroneous situations happen during account syncing
  • Set hasAccountSyncingSyncedAtLeastOnce also for a profile id first sync ever in UserStorageController

References

Changelog

@metamask/profile-sync-controller

  • ADDED: new UserStorageController state keys hasAccountSyncingSyncedAtLeastOnce and isAccountSyncingReadyToBeDispatched
  • ADDED: onAccountSyncErroneousSituation analytics callback to track how often erroneous situations happen during account syncing
  • FIXED: set hasAccountSyncingSyncedAtLeastOnce also for a profile id first sync ever in UserStorageController

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@mathieuartu mathieuartu added the team-identity Identity Team changes. https://github.com/orgs/MetaMask/teams/identity label Nov 19, 2024
@mathieuartu mathieuartu self-assigned this Nov 19, 2024
@mathieuartu
Copy link
Contributor Author

@metamaskbot publish-preview

@mathieuartu mathieuartu marked this pull request as ready for review November 19, 2024 21:03
@mathieuartu mathieuartu requested review from a team as code owners November 19, 2024 21:03
Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "19.0.0-preview-913143f",
  "@metamask-previews/address-book-controller": "6.0.1-preview-913143f",
  "@metamask-previews/announcement-controller": "7.0.1-preview-913143f",
  "@metamask-previews/approval-controller": "7.1.1-preview-913143f",
  "@metamask-previews/assets-controllers": "44.0.0-preview-913143f",
  "@metamask-previews/base-controller": "7.0.2-preview-913143f",
  "@metamask-previews/build-utils": "3.0.1-preview-913143f",
  "@metamask-previews/chain-controller": "0.1.3-preview-913143f",
  "@metamask-previews/composable-controller": "9.0.1-preview-913143f",
  "@metamask-previews/controller-utils": "11.4.3-preview-913143f",
  "@metamask-previews/ens-controller": "15.0.0-preview-913143f",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-913143f",
  "@metamask-previews/gas-fee-controller": "22.0.1-preview-913143f",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-913143f",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-913143f",
  "@metamask-previews/keyring-controller": "18.0.0-preview-913143f",
  "@metamask-previews/logging-controller": "6.0.2-preview-913143f",
  "@metamask-previews/message-manager": "11.0.1-preview-913143f",
  "@metamask-previews/multichain": "0.0.0-preview-913143f",
  "@metamask-previews/name-controller": "8.0.1-preview-913143f",
  "@metamask-previews/network-controller": "22.0.2-preview-913143f",
  "@metamask-previews/notification-controller": "7.0.0-preview-913143f",
  "@metamask-previews/notification-services-controller": "0.13.0-preview-913143f",
  "@metamask-previews/permission-controller": "11.0.3-preview-913143f",
  "@metamask-previews/permission-log-controller": "3.0.1-preview-913143f",
  "@metamask-previews/phishing-controller": "12.3.0-preview-913143f",
  "@metamask-previews/polling-controller": "12.0.1-preview-913143f",
  "@metamask-previews/preferences-controller": "14.0.0-preview-913143f",
  "@metamask-previews/profile-sync-controller": "1.0.1-preview-913143f",
  "@metamask-previews/queued-request-controller": "7.0.1-preview-913143f",
  "@metamask-previews/rate-limit-controller": "6.0.1-preview-913143f",
  "@metamask-previews/selected-network-controller": "19.0.0-preview-913143f",
  "@metamask-previews/signature-controller": "22.0.0-preview-913143f",
  "@metamask-previews/transaction-controller": "39.0.0-preview-913143f",
  "@metamask-previews/user-operation-controller": "18.0.0-preview-913143f"
}

Copy link

@Matt561 Matt561 left a comment

Choose a reason for hiding this comment

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

LGTM!

@mathieuartu mathieuartu merged commit 07db540 into main Nov 19, 2024
125 checks passed
@mathieuartu mathieuartu deleted the feat/account_sync_fixes_and_analytics branch November 19, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-identity Identity Team changes. https://github.com/orgs/MetaMask/teams/identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants