Skip to content

feat: pass trackEvent to DeFiPositionsController #33471

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bergarces
Copy link
Contributor

@bergarces bergarces commented Jun 4, 2025

Description

DeFiPositionsController can now report metrics about DeFi positions when those are being fetched.

It is necessary to pass the trackEvent to the controller in order to report them.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Open the extension with an address that has at least one DeFi position
  2. There should be an event with an anonimized summary of those positions

Screenshots/Recordings

Before

After

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 Jun 4, 2025

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.

@bergarces bergarces changed the title oass trackEvent to DeFiPositionsController feat: pass trackEvent to DeFiPositionsController Jun 4, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [bffa20b]
UI Startup Metrics (1224 ± 80 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1224110615148012661381
load106395513177111041204
domContentLoaded105694612937010961198
domInteractive17135151630
firstPaint795137130541010881206
backgroundConnect84244821
firstReactRender19162722024
getState1554171929
initialActions001000
loadScripts808705102768850953
setupStore84142811
WebpackHomeuiStartup21961709268121323342538
load17161282211218018192003
domContentLoaded17091274210817818131993
domInteractive151168101339
firstPaint1626735059187289
backgroundConnect2910401462648
firstReactRender15644370111300346
getState1243561522
initialActions318145
loadScripts17061272210617718111991
setupStore237312422032
FirefoxBrowserifyHomeuiStartup13221150174011613661617
load11791034157211212301456
domContentLoaded11791034157111212301456
domInteractive963825631108143
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect19126282039
firstReactRender22203122326
getState74375812
initialActions001001
loadScripts11621022155611312151442
setupStore64223612
WebpackHomeuiStartup15611353212815516231937
load13531170188813714331597
domContentLoaded13531169188713714331596
domInteractive77392542381115
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2514260262446
firstReactRender41285344449
getState1059710929
initialActions102112
loadScripts13321155186713214141569
setupStore11526626819
Benchmark value 1382 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1204 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1198 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 1206 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 22 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 953 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2197 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1717 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1710 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 1707 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2539 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 1992 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1937 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Sum of mean exceeds: 28ms | Sum of p95 exceeds: 201ms
Sum of all benchmark exceeds: 229ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 26 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [59328c1]
UI Startup Metrics (1230 ± 71 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1230108314567112721343
load106693912556811161166
domContentLoaded106093112466711071159
domInteractive16133141628
firstPaint787128125341511031162
backgroundConnect84375914
firstReactRender19154642024
getState1463971929
initialActions001001
loadScripts81369299765860913
setupStore74172810
WebpackHomeuiStartup20371588264126222342504
load15761213204320917271939
domContentLoaded15691207202020717241925
domInteractive161156111348
firstPaint1616938652183256
backgroundConnect2913405512652
firstReactRender13143360105130348
getState174346451323
initialActions317134
loadScripts15661204201020617221914
setupStore3973178117299
FirefoxBrowserifyHomeuiStartup13821175185211614531594
load12241022171511012801427
domContentLoaded12241022171511012791427
domInteractive1003531934111146
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2313159162345
firstReactRender24213632430
getState9319319810
initialActions001001
loadScripts12041007170211112641413
setupStore84738712
WebpackHomeuiStartup16341401242520017082161
load14151196204717414971822
domContentLoaded14151196204717414961822
domInteractive77331661785107
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21155262333
firstReactRender43306754549
getState15532639929
initialActions002111
loadScripts13961178203217314801791
setupStore11528128819
Benchmark value 40 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2505 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 299 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 1634 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1416 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1416 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 43 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1397 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 2161 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1822 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1822 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1791 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 141ms | Sum of p95 exceeds: 996ms
Sum of all benchmark exceeds: 1137ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 26 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [433e4da]
UI Startup Metrics (1242 ± 75 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1242110614817512781406
load107294712497011151216
domContentLoaded106494312416911081208
domInteractive17139891630
firstPaint78079124841710941188
backgroundConnect94507927
firstReactRender22155372337
getState1664692130
initialActions001001
loadScripts81370199169854962
setupStore84263915
WebpackHomeuiStartup21191578255323622852508
load16601247199318117851933
domContentLoaded16541243198918017801920
domInteractive15115581342
firstPaint1676837261199288
backgroundConnect2510327312445
firstReactRender13743416108120354
getState124166171123
initialActions316134
loadScripts16511241197917817781909
setupStore227317501637
FirefoxBrowserifyHomeuiStartup1341118917649914121507
load1186105115028412351347
domContentLoaded1186105015028412351347
domInteractive953518624110133
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect19135662029
firstReactRender23194332329
getState11424524826
initialActions001001
loadScripts1169103414898312151329
setupStore8417918712
WebpackHomeuiStartup16271380219016317201957
load14111199192315314961736
domContentLoaded14101199192315314951736
domInteractive79361591982121
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22155762331
firstReactRender43286354652
getState105447930
initialActions102111
loadScripts13911181190715414781719
setupStore12521523826
Benchmark value 1243 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1072 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1064 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 16 exceeds gate value 15 for chrome browserify home mean getState
Benchmark value 1406 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1216 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1209 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 1188 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 28 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 963 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2509 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 26 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 1627 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1411 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1411 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 44 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1392 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 1957 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1736 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1736 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 52 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 1719 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 127ms | Sum of p95 exceeds: 459ms
Sum of all benchmark exceeds: 586ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 26 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants