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

chore: Add currency conversion telemetry #26876

Merged

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Sep 3, 2024

Description

In order to figure out which currencies we should support 24hr % change, we need to know which currencies are the most popular.

Adds currency change dropdown event to telemetry events.

Open in GitHub Codespaces

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MMASSETS-344

Screenshots/Recordings

Pre-merge author checklist

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.

Copy link
Contributor

github-actions bot commented Sep 3, 2024

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.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Sep 3, 2024
@gambinish gambinish marked this pull request as ready for review September 3, 2024 21:57
@gambinish gambinish requested a review from a team as a code owner September 3, 2024 21:57
@gambinish gambinish removed the INVALID-PR-TEMPLATE PR's body doesn't match template label Sep 3, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [b01a18b]
Page Load Metrics (1670 ± 122 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint20722441545420201
domContentLoaded144522311660254122
load145222401670255122
domInteractive125830136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 175 Bytes (0.00%)
  • common: 53 Bytes (0.00%)

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.02%. Comparing base (c1a4386) to head (0bbaec6).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #26876   +/-   ##
========================================
  Coverage    70.01%   70.02%           
========================================
  Files         1445     1445           
  Lines        50197    50199    +2     
  Branches     14044    14044           
========================================
+ Hits         35145    35147    +2     
  Misses       15052    15052           

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

salimtb
salimtb previously approved these changes Sep 4, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [9257eed]
Page Load Metrics (1808 ± 101 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint20623971519674323
domContentLoaded15812263177819694
load159024131808211101
domInteractive147632168
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 175 Bytes (0.00%)
  • common: 53 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [cebe1a7]
Page Load Metrics (1662 ± 75 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22621041608354170
domContentLoaded14462055164615675
load14542065166215675
domInteractive137230147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 175 Bytes (0.00%)
  • common: 53 Bytes (0.00%)

category: MetaMetricsEventCategory.Settings,
event: MetaMetricsEventName.CurrentCurrencyChanged,
sensitiveProperties: {
current_currency_changed: newCurrency,
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if there is a reason why we are using sensitiveProperties instead of properties here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will change! Doesn't need to be sensitive. Also needs to be added to the user object anyway 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated! I also added the trait to MetaMetricsUserTrait to get added to the user, which is what we want to track (not how many times the toggle was clicked)

@gambinish gambinish requested a review from a team as a code owner September 9, 2024 18:22
@metamaskbot
Copy link
Collaborator

Builds ready [cdaef25]
Page Load Metrics (1688 ± 96 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint20921751551432207
domContentLoaded15012224167619895
load15102227168820196
domInteractive21209504622
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 59 Bytes (0.00%)
  • ui: 151 Bytes (0.00%)
  • common: 74 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [0add1f3]
Page Load Metrics (1777 ± 118 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint20524041579607291
domContentLoaded145423111757227109
load146424111777245118
domInteractive159136168
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 59 Bytes (0.00%)
  • ui: 151 Bytes (0.00%)
  • common: 74 Bytes (0.00%)

gambinish added a commit to MetaMask/metamask-mobile that referenced this pull request Sep 11, 2024
## **Description**

Mobile companion to:
MetaMask/metamask-extension#26876

In order to figure out which currencies we should support 24hr % change,
we need to know which currencies are the most popular.

This adds telemetry to the settings page to capture this.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MMASSETS-344

## **Manual testing steps**

## **Screenshots/Recordings**

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/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: Nico MASSART <[email protected]>
@metamaskbot
Copy link
Collaborator

Builds ready [87fa73a]
Page Load Metrics (1855 ± 146 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint145424431853304146
domContentLoaded144624251834303145
load145424551855304146
domInteractive14195434019
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 59 Bytes (0.00%)
  • ui: 151 Bytes (0.00%)
  • common: 74 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [0bbaec6]
Page Load Metrics (1684 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27120181545428206
domContentLoaded15152010165612058
load15382019168412058
domInteractive17472894
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 59 Bytes (0.00%)
  • ui: 151 Bytes (0.00%)
  • common: 74 Bytes (0.00%)

Copy link

sonarcloud bot commented Sep 17, 2024

@gambinish gambinish merged commit bc7929b into develop Sep 17, 2024
77 of 78 checks passed
@gambinish gambinish deleted the chore/mmassets-344_add-telemetry-currency-conversion branch September 17, 2024 22:09
@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 17, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [a2a83b4]
Page Load Metrics (1879 ± 122 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24525381733555266
domContentLoaded158324901843242116
load159325431879254122
domInteractive19184453416
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 59 Bytes (0.00%)
  • ui: 151 Bytes (0.00%)
  • common: 74 Bytes (0.00%)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-assets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants