Skip to content

feat(analytics): add sanitized origin to sentinel metadata#39765

Merged
rarquevaux merged 2 commits intomainfrom
feat/STX-analytics-dapp
Feb 5, 2026
Merged

feat(analytics): add sanitized origin to sentinel metadata#39765
rarquevaux merged 2 commits intomainfrom
feat/STX-analytics-dapp

Conversation

@rarquevaux
Copy link
Contributor

@rarquevaux rarquevaux commented Feb 3, 2026

Add sanitized origin to sentinel metadata

Description

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Add sanitized origin to sentinel metadata

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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.

Note

Medium Risk
Adds a new origin field to transaction/relay metadata and bumps @metamask/smart-transactions-controller, which could affect downstream analytics or any service expecting the prior metadata shape. Logic is small and guarded, but touches smart-transaction submission paths.

Overview
Adds sanitizeOrigin and uses it to attach a privacy-preserving origin value (URL hostname only, otherwise unchanged) to metadata sent with smart transaction submissions (single + batch) and EIP-7702 relay requests.

Includes unit tests for origin sanitization behavior and bumps @metamask/smart-transactions-controller from ^22.3.0 to ^22.4.0.

Written by Cursor Bugbot for commit 11196df. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

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 team-transactions Transactions team label Feb 3, 2026
@rarquevaux rarquevaux force-pushed the feat/STX-analytics-dapp branch from 94d7691 to c9c738f Compare February 3, 2026 22:26
@socket-security
Copy link

socket-security bot commented Feb 3, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​smart-transactions-controller@​22.3.0 ⏵ 22.4.09710010097 +150

View full report

@github-actions github-actions bot added the size-S label Feb 3, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 3, 2026

✨ Files requiring CODEOWNER review ✨

💸 @MetaMask/transactions (3 files, +71 -1)
  • 📁 app/
    • 📁 scripts/
      • 📁 lib/
        • 📁 smart-transaction/
          • 📄 smart-transactions.ts +4 -1
          • 📄 utils.test.ts +43 -0
          • 📄 utils.ts +24 -0

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 3, 2026

Builds ready [c9c738f]
UI Startup Metrics (1368 ± 99 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1368116916439914341557
load--117297914629912301369
domContentLoaded--116597014529812241348
domInteractive--271698182277
firstPaint--183651245177195346
backgroundConnect--23021327613234260
firstReactRender--15102531721
initialActions--104112
loadScripts--95275012169810091133
setupStore--1263441419
numNetworkReqs--211577171572
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--263416456436112028655278
load--11931031160213212661513
domContentLoaded--11721023154812712301496
domInteractive--36191542735124
firstPaint--225761507187258426
backgroundConnect--67629337177285162592
firstReactRender--24174862734
initialActions--106112
loadScripts--934801127311410011205
setupStore--1554571828
numNetworkReqs--1286230555151246
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--85168112451099151021
load--7275931003104794939
domContentLoaded--722589991103788933
domInteractive--2616137222278
firstPaint--11363996105120241
backgroundConnect--3718160254096
firstReactRender--15104151525
initialActions--107112
loadScripts--719587987102784931
setupStore--1162331118
numNetworkReqs--221579171573
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1269908198025714901811
load--7226141099109722988
domContentLoaded--7116091084110705981
domInteractive--3518237293596
firstPaint--1486765080186269
backgroundConnect--16012945955157268
firstReactRender--22174142429
initialActions--102011
loadScripts--7086071064107703970
setupStore--1142131417
numNetworkReqs--1525730255167281
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--17131417233420518582118
load--14271231210017215441748
domContentLoaded--14261224209917215441747
domInteractive--833425247120158
firstPaint--------
backgroundConnect--872821449135188
firstReactRender--13101711315
initialActions--102122
loadScripts--13781206207215214801617
setupStore--155105171359
numNetworkReqs--241291211884
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--30332234890771832123847
load--15681300733061615401854
domContentLoaded--15671294732961615401854
domInteractive--153371309183143340
firstPaint--------
backgroundConnect--40812714052915951028
firstReactRender--19146272027
initialActions--207122
loadScripts--15281260728861415191809
setupStore--14610934197140668
numNetworkReqs--914224748102223
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16311344212118417182020
load--13981199174813215071676
domContentLoaded--13981195174713215071676
domInteractive--903023152133183
firstPaint--------
backgroundConnect--722321951110177
firstReactRender--13112121416
initialActions--103012
loadScripts--13561180166011114391561
setupStore--155224281237
numNetworkReqs--231284181876
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--313721699862108632425086
load--16851285683368016632599
domContentLoaded--16841284683268016632598
domInteractive--15549587107191392
firstPaint--------
backgroundConnect--51711878358005821138
firstReactRender--21155552329
initialActions--207123
loadScripts--16301262676967516122490
setupStore--13915742169146602
numNetworkReqs--87392934993191
19--------
📊 Page Load Benchmark Results

Current Commit: c9c738f | Date: 2/3/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±62ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 726ms (±60ms) 🟢 | historical mean value: 724ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±13ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 62ms 1.01s 1.34s 1.25s 1.34s
domContentLoaded 726ms 60ms 696ms 1.01s 930ms 1.01s
firstPaint 75ms 13ms 56ms 192ms 84ms 192ms
firstContentfulPaint 75ms 13ms 56ms 192ms 84ms 192ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 338 Bytes (0.01%)
  • ui: 0 Bytes (0%)
  • common: 20 Bytes (0%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 4, 2026

Builds ready [11196df]
UI Startup Metrics (1342 ± 112 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13421133177611214061501
load--1138936149910212021286
domContentLoaded--1131930149110111951275
domInteractive--261591182379
firstPaint--2115913772401951088
backgroundConnect--21919926716227252
firstReactRender--1692641823
initialActions--107113
loadScripts--93073212801019961075
setupStore--1274461419
numNetworkReqs--2315102211586
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--2773138110523167135366734
load--11961033177715112321554
domContentLoaded--11811015177014912061540
domInteractive--3819456473394
firstPaint--206791467151250386
backgroundConnect--854283434389912312930
firstReactRender--25146182841
initialActions--109114
loadScripts--94579815171379771271
setupStore--1564271832
numNetworkReqs--1204227547147209
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--87868412831239811082
load--7396101204116827944
domContentLoaded--7336021196115820939
domInteractive--261688182284
firstPaint--1076137453116202
backgroundConnect--3518153243891
firstReactRender--15103451629
initialActions--104113
loadScripts--7306001194115818936
setupStore--1162641121
numNetworkReqs--231598211585
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1298854238230413562161
load--75263912391307381105
domContentLoaded--74163212301307201099
domInteractive--40211882940113
firstPaint--15973665100194385
backgroundConnect--183132818121163398
firstReactRender--23185252430
initialActions--103111
loadScripts--73862912221287181089
setupStore--1242551521
numNetworkReqs--1404929545158234
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16941342237423118482179
load--14191177199218015501798
domContentLoaded--14181173199118115491792
domInteractive--75322373795137
firstPaint--------
backgroundConnect--882723458134201
firstReactRender--13102321318
initialActions--103122
loadScripts--13681153185615714701684
setupStore--205213321498
numNetworkReqs--2512105221889
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27961924760578929003679
load--15691277598262415522058
domContentLoaded--15681276598262415522058
domInteractive--1283849484145319
firstPaint--------
backgroundConnect--3771121211276459951
firstReactRender--19146681928
initialActions--213123
loadScripts--15251255594561915031980
setupStore--159101359224161666
numNetworkReqs--844015731102143
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16611405227417417592002
load--14141201172011614871628
domContentLoaded--14131196172011614871628
domInteractive--973124353132225
firstPaint--------
backgroundConnect--64231863781147
firstReactRender--15113031521
initialActions--103122
loadScripts--13781183168410314331568
setupStore--2152563713109
numNetworkReqs--231280171871
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27862093406035529853514
load--15721325273121016511997
domContentLoaded--15711325273121016511997
domInteractive--15648616119181428
firstPaint--------
backgroundConnect--4191241898314614981
firstReactRender--22166762433
initialActions--214123
loadScripts--15241196270320815781903
setupStore--15910948189209589
numNetworkReqs--813119832103157
19--------
📊 Page Load Benchmark Results

Current Commit: 11196df | Date: 2/4/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±64ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 749ms (±62ms) 🟢 | historical mean value: 719ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±11ms) 🟢 | historical mean value: 82ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 64ms 1.03s 1.35s 1.29s 1.35s
domContentLoaded 749ms 62ms 712ms 1.03s 956ms 1.03s
firstPaint 79ms 11ms 68ms 172ms 88ms 172ms
firstContentfulPaint 79ms 11ms 68ms 172ms 88ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 338 Bytes (0.01%)
  • ui: 0 Bytes (0%)
  • common: 20 Bytes (0%)

@rarquevaux rarquevaux added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 05349ce Feb 5, 2026
179 checks passed
@rarquevaux rarquevaux deleted the feat/STX-analytics-dapp branch February 5, 2026 16:05
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2026
@metamaskbot metamaskbot added the release-13.18.0 Issue or pull request that will be included in release 13.18.0 label Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.18.0 Issue or pull request that will be included in release 13.18.0 size-S team-transactions Transactions team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants