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

Add petnames metrics #20994

Merged
merged 26 commits into from
Oct 2, 2023
Merged

Add petnames metrics #20994

merged 26 commits into from
Oct 2, 2023

Conversation

matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Sep 21, 2023

Description

Add metrics to monitor petnames usage, specifically the following events:

  • Petname Displayed
  • Petname Model Opened
  • Petname Created
  • Petname Updated
  • Petname Deleted

Plus the petname_addresses_count user trait.

Also applies the following changes to the Name and NameDetails components:

  • Remove proposed name from Name component.
  • Update proposed names every 2 seconds in the NameDetails component.
    • Only invokes providers if delay has elapsed.
    • Default delay is 2 minutes.
  • Display checksum addresses.
  • Truncate the Name component text using ellipsis.
  • Truncate the proposed names options in the NameDetails component using ellipsis.
  • Sort proposed name options by source label.

Related Issues

Fixes #1318

Pre-merge Author Checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • 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.

@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner September 21, 2023 19:57
@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.

@matthewwalsh0 matthewwalsh0 added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Sep 21, 2023
@metamaskbot
Copy link
Collaborator

Builds ready [97761f7]
Page Load Metrics (1442 ± 27 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint109153127115
domContentLoaded1359156714425627
load1359156714425627
domInteractive1359156714425627
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 381 Bytes (0.01%)
  • ui: -17.19 KiB (-0.21%)
  • common: 18.88 KiB (0.41%)

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (547cbbf) 68.41% compared to head (b596e4e) 68.47%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #20994      +/-   ##
===========================================
+ Coverage    68.41%   68.47%   +0.06%     
===========================================
  Files         1012     1012              
  Lines        40508    40597      +89     
  Branches     10823    10841      +18     
===========================================
+ Hits         27710    27796      +86     
- Misses       12798    12801       +3     
Files Coverage Δ
app/scripts/controllers/metametrics.js 80.76% <100.00%> (+0.56%) ⬆️
app/scripts/lib/SnapsNameProvider.ts 95.45% <100.00%> (ø)
app/scripts/metamask-controller.js 53.47% <ø> (-0.08%) ⬇️
shared/constants/metametrics.ts 100.00% <100.00%> (ø)
...s/contract-details-modal/contract-details-modal.js 68.00% <ø> (ø)
ui/contexts/metametrics.js 26.67% <ø> (ø)
ui/hooks/useName.ts 100.00% <100.00%> (ø)
...t/signature-request-data/signature-request-data.js 94.74% <0.00%> (ø)
ui/components/app/name/name-details/metrics.ts 93.55% <93.55%> (ø)
.../components/app/name/name-details/name-details.tsx 95.79% <95.71%> (+0.23%) ⬆️
... and 1 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Update proposed names from name details component.
Truncate in name component.
Truncate in name details component.
Sort proposed names by source label.
@socket-security
Copy link

socket-security bot commented Sep 26, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@metamask/name-controller 3.0.0 None +0 135 kB metamaskbot

@matthewwalsh0 matthewwalsh0 requested review from a team as code owners September 27, 2023 19:12
@socket-security
Copy link

socket-security bot commented Sep 27, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

@metamaskbot
Copy link
Collaborator

Builds ready [b596e4e]
Page Load Metrics (884 ± 345 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint8212396126
domContentLoaded6912091147
load791659884718345
domInteractive6912091147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 719 Bytes (0.02%)
  • ui: -16.16 KiB (-0.20%)
  • common: 54.85 KiB (1.17%)

@matthewwalsh0 matthewwalsh0 merged commit b7ad9f6 into develop Oct 2, 2023
9 checks passed
@matthewwalsh0 matthewwalsh0 deleted the feat/petnames-metrics branch October 2, 2023 09:21
@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 2023
@metamaskbot metamaskbot added the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.3.0 Issue or pull request that will be included in release 11.3.0 team-confirmations-system DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants