-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: Adding code to capture metrics for dapp swaps #36885
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
Conversation
|
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. |
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (12 files, +1467 -18)
🧩 @MetaMask/extension-devs (4 files, +692 -0)
📜 @MetaMask/policy-reviewers (4 files, +692 -0)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🔗 @MetaMask/supply-chain (4 files, +692 -0)
|
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useDappSwapComparisonInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
ui/pages/confirmations/components/confirm/info/hooks/useUniswapShieldInfo.ts
Outdated
Show resolved
Hide resolved
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [c50cf29]
UI Startup Metrics (1137 ± 83 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| this.controllerMessenger, | ||
| `${BRIDGE_CONTROLLER_NAME}:${BridgeBackgroundAction.TRACK_METAMETRICS_EVENT}`, | ||
| ), | ||
| [BridgeBackgroundAction.FETCH_QUOTES]: this.controllerMessenger.call.bind( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally this would go in the bridge-controller-init file in the api property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we avoid adding to the legacy MetamaskController, but for the sake of time and codeowner review, not an urgent one.
02c4771 to
c060e20
Compare
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [c6e3040]
UI Startup Metrics (1243 ± 75 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/pages/confirmations/components/confirm/info/dapp-swap-comparison-utils.ts
Outdated
Show resolved
Hide resolved
Bug: Latency Calculation Error Causes NaNThe |
Bug: Latency Calculation Fails on Initial 'N/A' ValueIn |
Bug: Case-Sensitive Address Comparison BugThe |
Bug: Latency Metric Inflated by Double CountingThe |
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [6da443b]
UI Startup Metrics (1250 ± 70 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Bug: Latency Calculation Error: Double-Counting IssueThe |
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [7e2621a]
UI Startup Metrics (1286 ± 84 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Capturing DAPP Swap metrics
Changelog
CHANGELOG entry:
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5974
Manual testing steps
Screenshots/Recordings
NA
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Add Dapp swap comparison metrics: new hooks/utils to parse swaps, fetch quotes, compute USD values, and report telemetry; conditional banner wiring; background quotes fetch; LavaMoat policy updates; and tests.
DappSwapComparisonBannerand render it inbase-transaction-infowhen remote flagdappSwapMetrics.enabledis true and origin ishttps://app.uniswap.org.useDappSwapComparisonInfoto parse swap tx data, fetch quotes, compute USD values, and emit telemetry (including latency metrics viauseDappSwapComparisonLatencyMetrics).dapp-swap-comparison-utils(getDataFromSwap,getBestQuote,getTokenValueFromRecord,getBalanceChangeFromSimulationData).fetchAllErc20DecimalsandfetchAllTokenDetails; refactoruseBalanceChangesto usefetchAllErc20Decimals.BridgeBackgroundAction.FETCH_QUOTESinmetamask-controllerand addstore/controller-actions/bridge-controller.fetchQuotes.@sentry/browserand internals.Written by Cursor Bugbot for commit 7e2621a. This will update automatically on new commits. Configure here.