Skip to content

fix(sentry): stop billing spans that declared a parent as segments - #45581

Open
MajorLift wants to merge 3 commits into
mainfrom
fix/trace-unresolvable-parent-becomes-segment
Open

fix(sentry): stop billing spans that declared a parent as segments#45581
MajorLift wants to merge 3 commits into
mainfrom
fix/trace-unresolvable-parent-becomes-segment

Conversation

@MajorLift

@MajorLift MajorLift commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG entry: null

Summary

  • startSpan conflated three distinct parent states, two of which billed a transaction for a span that asked to be a child. Measured at ~44.6% of extension transactions across 25 families.
  • Checks are now nullish rather than falsyTraceContext is unknown, so 0 / '' / false were reaching the no-parent branch.
  • undefined and null are no longer collapsed: traceCallback is typed (span: Sentry.Span | null), so a caller receives null whenever the SDK created no span and passes it straight back. That was being promoted to a transaction.
  • A declared-but-unresolvable in-process parent now nests under the active span instead of routing to continueTrace with parentSpan: undefined.
  • Includes the regression tests. Fixes MetaMask-planning#7569.

The three states, before and after

parentContext Before After
undefined — no parent declared ambient + forceTransaction → segment unchanged (intended)
null — parent intended, no span ambient + forceTransactionsegment child of ambient, no promotion
0 / '' / false treated as no parent → segment child of ambient, no promotion
{_name} in-process, map miss continueTracesegment child of ambient, no promotion
{_name, _traceId, _spanId}, map miss continueTracesegment child of ambient, no promotion
{_traceId, _spanId} only continueTrace → segment unchanged (genuine cross-process)
live span child unchanged

Context: the suite currently asserts the defect as correct

shared/lib/trace.test.ts already covers this path in cross-process trace context (continueTrace), and stays green — because one of its cases asserts the segment-producing value as the expected outcome:

it('passes parentSpan as undefined inside continueTrace callback', () => {
  expect(startSpanMock).toHaveBeenCalledWith(
    expect.objectContaining({ parentSpan: undefined }),

No test anywhere asserts that a span is not a segment. Every forceTransaction reference in the suite lives in the sampler tests, which measure sample rates rather than trace shape. That test will need to be corrected as part of the fix, or the fix will present as a regression.

The existing block also covers the map-lookup hit (falls back to map lookup when _name is also present) but not the miss. The miss is the defect, and is what this test adds.

Measured impact

Measured 2026-08-17, project metamask (273505), production, 15–17 Aug (after the AggregatedBalanceSelector inbound filter, so free of that spike):

Day Transactions Carrying a parent_span id Share
15 Aug 21,142,155 9,652,049 45.7%
16 Aug 21,150,135 9,189,376 43.4%
17 Aug (partial) 11,482,038 5,071,566 44.2%

Segments carrying a parent id, live in Sentry · true roots, for comparison

Across 25 transaction families, including Provider Create Accounts (v2 - batched), Wallet Alignment, UI Startup, Contact Sync Full, BackendWebSocketService Connection and Smart Transactions: *.

Relationship to #45405 (stop force-promoting child spans)

#45405 touches the same function and should land in a compatible order, but addresses a different condition:

condition defect
#45405 !parentSpan && !parentContext no parent declared; ambient span inherited and promoted via inferred forceTransaction
This / #7569 !parentSpan && hasDistributedTraceIds(parentContext) a parent was declared but could not be resolved; routed to continueTrace with parentSpan: undefined

#45405 does not change the continueTrace branch, so it does not resolve #7569. Expect a textual conflict in startSpan if both land — this PR adds no production code, so resolution should be trivial.

Test plan

  • yarn jest shared/lib/trace.test.ts — two new cases, existing cases unchanged
  • The pre-existing case passes parentSpan as undefined inside continueTrace callback still passes: it uses a {_traceId, _spanId}-only context, which is a genuine cross-process continuation and still takes that path
  • Post-merge, re-measure is_transaction:true has:parent_span — expect a large drop, with the residual explicable as genuine cross-process traffic

⚠️ Not run locally. Authored from a shallow clone with no installed dependencies, so neither the test suite nor eslint/prettier has executed on this branch. The behaviour change is derived from reading startSpan and its callers, with no runtime signal behind it. CI is the first execution, and the diff warrants a careful read rather than a rubber stamp.

Rollout note. This removes a large fraction of billed transactions across many families at once. That is the intent, but the drop should be expected rather than investigated as a regression — worth announcing before it lands.

An in-process parent whose span is not in `tracesByKey` resolves to
`null` — the same value `resolveParentSpan` returns for "no parent
intended". `startSpan` cannot distinguish the two, sees the serialized
trace ids, and routes to `continueTrace` with `parentSpan: undefined`,
promoting the span to a segment. A segment is a billed transaction.

The existing suite covers the map-lookup hit but not the miss, and
asserts `parentSpan: undefined` as correct — so the defect is currently
encoded as the specification and cannot be detected by any test.

Marked `.failing` because it asserts the intended behaviour, which the
implementation does not yet have. Flip to `it` when the fix lands.

Refs MetaMask/MetaMask-planning#7569
@MajorLift
MajorLift deployed to pr-comment August 17, 2026 13:08 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
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.

@metamask-ci metamask-ci Bot added the team-extension-platform Extension Platform team label Aug 17, 2026
@MajorLift
MajorLift deployed to pr-comment August 17, 2026 13:09 — with GitHub Actions Active
@metamask-ci

metamask-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
Builds ready [18931b5] [reused from 102760a]
⚡ Performance Benchmarks (Total: 🟢 0 pass · 🟡 0 warn · 🔴 1 fail)

Baseline (latest main): 171ed20 | Date: 7/28/2026 | Pipeline: 32033477684 | Baseline logs

Metricschrome-webpack
onboardingNewWallet
[Sentry log · main/release]
🔴 longTaskTotalDuration(p95) [CI log]

Regressions (🔴 1 failure)

Interaction Benchmarks · Samples: 5

⚠️ Missing data: chrome/webpack/interactionUserActions, firefox/webpack/interactionUserActions

✅ No regressions detected

Startup Benchmarks · Samples: 100

⚠️ Missing data: chrome/webpack/startupStandardHome, chrome/webpack/startupPowerUserHome, firefox/webpack/startupStandardHome, firefox/webpack/startupPowerUserHome

✅ No regressions detected

User Journey Benchmarks · Samples: 5 · mock API 🔴 1

⚠️ Missing data: chrome/webpack/userJourneyOnboardingImport, chrome/webpack/userJourneyAssets, chrome/webpack/userJourneyAccountManagement, chrome/webpack/userJourneyTransactions, firefox/webpack/userJourneyOnboardingImport, firefox/webpack/userJourneyOnboardingNew, firefox/webpack/userJourneyAssets, firefox/webpack/userJourneyAccountManagement, firefox/webpack/userJourneyTransactions

Benchmarkchrome-webpack
onboardingNewWallet
[Sentry log · main/release]
🔴 [CI log]
🔴 total

📈 Results compared to the previous 5 runs on main

  • onboardingNewWallet/longTaskTotalDuration: +29%
  • onboardingNewWallet/longTaskMaxDuration: +17%
  • onboardingNewWallet/tbt: +90%
Dapp Page Load Benchmarks · Samples: 100

⚠️ Missing data: chrome/webpack/pageLoadBenchmark

✅ No regressions detected

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 0 Bytes (0%)
  • zip: 0 Bytes (0%)

`startSpan` conflated three distinct states, two of which produced a
billed transaction for a span that asked to be a child:

- `undefined` — no parent declared. Ambient inheritance plus promotion is
  intended, and is unchanged.
- `null` — a parent was intended but no span exists. `traceCallback` is
  typed `(span: Sentry.Span | null)`, so callers receive and pass back
  `null` whenever the SDK created none. This was being promoted.
- declared but unresolvable — an in-process context whose `tracesByKey`
  lookup missed fell through to `continueTrace` with
  `parentSpan: undefined`, minting a segment for a lookup failure.

Checks are now nullish rather than falsy, since `TraceContext` is
`unknown` and `0`/`''`/`false` reached the no-parent branch.
`hasInProcessIdentity` separates a local context from a genuine
cross-process continuation, so only the latter takes `continueTrace`.

Measured before the fix: ~44.6% of extension transactions carried a
`parent_span` id while billed as roots, across 25 transaction families.

Fixes MetaMask/MetaMask-planning#7569
@MajorLift
MajorLift deployed to pr-comment August 17, 2026 13:13 — with GitHub Actions Active
@MajorLift MajorLift changed the title test(sentry): add failing regression for unresolvable in-process parent fix(sentry): stop billing spans that declared a parent as segments Aug 17, 2026
@MajorLift
MajorLift deployed to pr-comment August 17, 2026 13:37 — with GitHub Actions Active
@metamask-ci

metamask-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
Builds ready [b8cfbbf]
⚡ Performance Benchmarks (Total: 🟢 11 pass · 🟡 9 warn · 🔴 3 fail)

Baseline (latest main): 171ed20 | Date: 7/28/2026 | Pipeline: 32033895098 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 3 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: +190%
  • loadNewAccount/total: +190%
  • loadNewAccount/inp: +21%
  • confirmTx/longTaskTotalDuration: -11%
  • confirmTx/longTaskMaxDuration: +39%
  • confirmTx/tbt: -19%
  • confirmTx/lcp: +11%
  • bridgeUserActions/bridge_load_page: +15%
  • bridgeUserActions/bridge_load_asset_picker: +61%
  • bridgeUserActions/longTaskCount: +11%
  • bridgeUserActions/longTaskTotalDuration: +21%
  • bridgeUserActions/tbt: +30%
  • loadNewAccount/load_new_account: +191%
  • loadNewAccount/total: +191%
  • loadNewAccount/lcp: +1116%
  • confirmTx/longTaskCount: -100%
  • confirmTx/longTaskTotalDuration: -100%
  • confirmTx/longTaskMaxDuration: -100%
  • confirmTx/tbt: -100%
  • confirmTx/inp: -32%
  • confirmTx/fcp: -48%
  • confirmTx/lcp: +1236%
  • bridgeUserActions/bridge_load_page: +209%
  • bridgeUserActions/bridge_load_asset_picker: +204%
  • bridgeUserActions/bridge_search_token: +12%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/total: +49%
  • bridgeUserActions/fcp: -56%
  • bridgeUserActions/lcp: +1173%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 confirmTx/FCP: p75 1.8s
  • 🟡 loadNewAccount/FCP: p75 1.8s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
startupPowerUserHome
[Sentry log · main/release]
🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/backgroundConnect: +16%
  • startupStandardHome/firstReactRender: -99%
  • startupStandardHome/numNetworkReqs: -14%
  • startupStandardHome/domInteractive: +27%
  • startupStandardHome/backgroundConnect: +12%
  • startupStandardHome/firstReactRender: -98%
  • startupStandardHome/numNetworkReqs: -17%
  • startupStandardHome/fcp: +12%
  • startupPowerUserHome/domInteractive: -41%
  • startupPowerUserHome/backgroundConnect: -20%
  • startupPowerUserHome/firstReactRender: -99%
  • startupPowerUserHome/initialActions: +11%
  • startupPowerUserHome/setupStore: -68%
  • startupPowerUserHome/numNetworkReqs: -44%
  • startupPowerUserHome/inp: +14%
  • startupPowerUserHome/fcp: -33%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 startupPowerUserHome/INP: p75 216ms
  • 🟡 startupPowerUserHome/LCP: p75 3.1s
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟡 [CI log]
🟡 total
🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total
assetDetails
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
importSrpHome
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]
sendTransactions
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
swap
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: +14%
  • onboardingImportWallet/metricsToWalletReadyScreen: +30%
  • onboardingImportWallet/doneButtonToHomeScreen: -92%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: -49%
  • onboardingImportWallet/longTaskCount: -86%
  • onboardingImportWallet/longTaskTotalDuration: -96%
  • onboardingImportWallet/longTaskMaxDuration: -92%
  • onboardingImportWallet/tbt: -99%
  • onboardingImportWallet/total: -81%
  • onboardingNewWallet/srpButtonToPwForm: -19%
  • onboardingNewWallet/skipBackupToMetricsScreen: -24%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -38%
  • onboardingNewWallet/doneButtonToAssetList: -81%
  • onboardingNewWallet/longTaskCount: -100%
  • onboardingNewWallet/longTaskTotalDuration: -100%
  • onboardingNewWallet/longTaskMaxDuration: -100%
  • onboardingNewWallet/tbt: -100%
  • onboardingNewWallet/total: -78%
  • solanaAssetDetails/assetClickToPriceChart: +234%
  • solanaAssetDetails/longTaskCount: -100%
  • solanaAssetDetails/longTaskTotalDuration: -100%
  • solanaAssetDetails/longTaskMaxDuration: -100%
  • solanaAssetDetails/tbt: -100%
  • solanaAssetDetails/total: +234%
  • solanaAssetDetails/fcp: +14%
  • importSrpHome/loginToHomeScreen: -23%
  • importSrpHome/homeAfterImportWithNewWallet: -14%
  • importSrpHome/longTaskCount: -30%
  • importSrpHome/longTaskTotalDuration: -50%
  • importSrpHome/longTaskMaxDuration: -28%
  • importSrpHome/tbt: -59%
  • importSrpHome/total: -15%
  • importSrpHome/inp: -43%
  • importSrpHome/cls: +510%
  • sendTransactions/openSendPageFromHome: -32%
  • sendTransactions/selectTokenToSendFormLoaded: -14%
  • sendTransactions/reviewTransactionToConfirmationPage: -98%
  • sendTransactions/longTaskCount: -100%
  • sendTransactions/longTaskTotalDuration: -100%
  • sendTransactions/longTaskMaxDuration: -100%
  • sendTransactions/tbt: -100%
  • sendTransactions/total: -96%
  • sendTransactions/inp: -44%
  • sendTransactions/fcp: +13%
  • sendTransactions/lcp: -60%
  • sendTransactions/cls: +171%
  • swap/openSwapPageFromHome: +849%
  • swap/fetchAndDisplaySwapQuotes: +86%
  • swap/longTaskCount: +33%
  • swap/longTaskTotalDuration: -11%
  • swap/tbt: -84%
  • swap/total: +102%
  • swap/lcp: -71%
  • swap/cls: -92%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 importSrpHome/FCP: p75 1.8s
  • 🟡 sendTransactions/FCP: p75 1.9s
  • 🟡 swap/FCP: p75 1.9s
  • 🟡 solanaAssetDetails/FCP: p75 1.9s
  • 🟡 sendTransactions/FCP: p75 1.9s
  • 🟡 swap/FCP: p75 1.9s
Dapp Page Load Benchmarks · Samples: 100

⚠️ Missing data: chrome/webpack/pageLoadBenchmark

✅ No regressions detected

Bundle sizes
  • background: 14.4 MiB
  • ui: 18.57 MiB
  • common: 0 Bytes
  • other: 1000.53 KiB
  • contentScripts: 1.88 MiB
  • zip: 21.4 MiB
No bundle-size baseline commit was available for this build, so diff values are omitted.

@MajorLift
MajorLift deployed to pr-comment August 17, 2026 16:36 — with GitHub Actions Active
@metamask-ci metamask-ci Bot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Aug 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

@MajorLift
MajorLift deployed to pr-comment August 17, 2026 17:00 — with GitHub Actions Active
@metamask-ci

metamask-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
Builds ready [0c9a825]
⚡ Performance Benchmarks (Total: 🟢 16 pass · 🟡 6 warn · 🔴 2 fail)

Baseline (latest main): 171ed20 | Date: 7/28/2026 | Pipeline: 32046387790 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]

Regressions (🔴 2 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: +191%
  • loadNewAccount/total: +191%
  • loadNewAccount/cls: +15%
  • confirmTx/longTaskTotalDuration: -11%
  • confirmTx/longTaskMaxDuration: +43%
  • confirmTx/tbt: -19%
  • confirmTx/fcp: +10%
  • bridgeUserActions/bridge_load_asset_picker: +77%
  • bridgeUserActions/longTaskCount: +11%
  • bridgeUserActions/longTaskMaxDuration: -24%
  • bridgeUserActions/tbt: -57%
  • bridgeUserActions/inp: +15%
  • loadNewAccount/load_new_account: +191%
  • loadNewAccount/total: +191%
  • loadNewAccount/inp: -17%
  • loadNewAccount/fcp: +13%
  • loadNewAccount/lcp: +1694%
  • confirmTx/longTaskCount: -100%
  • confirmTx/longTaskTotalDuration: -100%
  • confirmTx/longTaskMaxDuration: -100%
  • confirmTx/tbt: -100%
  • confirmTx/inp: -17%
  • confirmTx/fcp: -46%
  • confirmTx/lcp: +1269%
  • bridgeUserActions/bridge_load_page: +194%
  • bridgeUserActions/bridge_load_asset_picker: +136%
  • bridgeUserActions/longTaskCount: -100%
  • bridgeUserActions/longTaskTotalDuration: -100%
  • bridgeUserActions/longTaskMaxDuration: -100%
  • bridgeUserActions/tbt: -100%
  • bridgeUserActions/total: +25%
  • bridgeUserActions/inp: +15%
  • bridgeUserActions/fcp: -42%
  • bridgeUserActions/lcp: +1280%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 1.9s
  • 🟡 confirmTx/FCP: p75 1.9s
  • 🟡 bridgeUserActions/FCP: p75 1.8s
  • 🟡 loadNewAccount/FCP: p75 1.9s
  • 🟡 loadNewAccount/LCP: p75 3.1s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
startupPowerUserHome
[Sentry log · main/release]
🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/backgroundConnect: +12%
  • startupStandardHome/firstReactRender: -99%
  • startupStandardHome/setupStore: +14%
  • startupStandardHome/numNetworkReqs: -14%
  • startupStandardHome/firstReactRender: -98%
  • startupStandardHome/numNetworkReqs: -20%
  • startupPowerUserHome/backgroundConnect: -21%
  • startupPowerUserHome/firstReactRender: -99%
  • startupPowerUserHome/initialActions: +11%
  • startupPowerUserHome/setupStore: -70%
  • startupPowerUserHome/numNetworkReqs: -41%
  • startupPowerUserHome/inp: +19%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 startupPowerUserHome/INP: p75 224ms
  • 🟡 startupPowerUserHome/LCP: p75 3.1s
User Journey Benchmarks · Samples: 5 · mock API
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟡 [CI log]
🟡 total
🟢 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
assetDetails
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
solanaAssetDetails
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
importSrpHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
sendTransactions
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
swap
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/srpButtonToSrpForm: -14%
  • onboardingImportWallet/confirmSrpToPwForm: -14%
  • onboardingImportWallet/pwFormToMetricsScreen: -16%
  • onboardingImportWallet/metricsToWalletReadyScreen: -35%
  • onboardingImportWallet/doneButtonToHomeScreen: -92%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: -56%
  • onboardingImportWallet/longTaskCount: -100%
  • onboardingImportWallet/longTaskTotalDuration: -100%
  • onboardingImportWallet/longTaskMaxDuration: -100%
  • onboardingImportWallet/tbt: -100%
  • onboardingImportWallet/total: -82%
  • onboardingNewWallet/srpButtonToPwForm: -18%
  • onboardingNewWallet/createPwToRecoveryScreen: -19%
  • onboardingNewWallet/skipBackupToMetricsScreen: -26%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -33%
  • onboardingNewWallet/doneButtonToAssetList: -82%
  • onboardingNewWallet/longTaskCount: -69%
  • onboardingNewWallet/longTaskTotalDuration: -79%
  • onboardingNewWallet/longTaskMaxDuration: -52%
  • onboardingNewWallet/tbt: -100%
  • onboardingNewWallet/total: -79%
  • solanaAssetDetails/assetClickToPriceChart: -25%
  • solanaAssetDetails/longTaskCount: -100%
  • solanaAssetDetails/longTaskTotalDuration: -100%
  • solanaAssetDetails/longTaskMaxDuration: -100%
  • solanaAssetDetails/tbt: -100%
  • solanaAssetDetails/total: -25%
  • solanaAssetDetails/inp: -29%
  • solanaAssetDetails/fcp: -21%
  • solanaAssetDetails/lcp: -24%
  • importSrpHome/loginToHomeScreen: -36%
  • importSrpHome/homeAfterImportWithNewWallet: -63%
  • importSrpHome/longTaskCount: -65%
  • importSrpHome/longTaskTotalDuration: -71%
  • importSrpHome/longTaskMaxDuration: -55%
  • importSrpHome/tbt: -76%
  • importSrpHome/total: -59%
  • importSrpHome/inp: -64%
  • importSrpHome/fcp: -18%
  • importSrpHome/lcp: -21%
  • importSrpHome/cls: +443%
  • sendTransactions/openSendPageFromHome: -44%
  • sendTransactions/selectTokenToSendFormLoaded: -43%
  • sendTransactions/reviewTransactionToConfirmationPage: -99%
  • sendTransactions/longTaskCount: -100%
  • sendTransactions/longTaskTotalDuration: -100%
  • sendTransactions/longTaskMaxDuration: -100%
  • sendTransactions/tbt: -100%
  • sendTransactions/total: -97%
  • sendTransactions/inp: -63%
  • sendTransactions/fcp: -33%
  • sendTransactions/lcp: +135%
  • sendTransactions/cls: +171%
  • swap/openSwapPageFromHome: +160%
  • swap/fetchAndDisplaySwapQuotes: +84%
  • swap/longTaskCount: -100%
  • swap/longTaskTotalDuration: -100%
  • swap/longTaskMaxDuration: -100%
  • swap/tbt: -100%
  • swap/total: +86%
  • swap/inp: -44%
  • swap/fcp: -40%
  • swap/lcp: -79%
  • swap/cls: -92%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 swap/FCP: p75 1.9s
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • dappPageLoad/pageLoadTime: -58%
  • dappPageLoad/firstPaint: -46%
  • dappPageLoad/firstContentfulPaint: -46%
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 51.13 KiB (0.35%)
  • ui: 477 Bytes (0%)
  • common: 0 Bytes (0%)
  • other: 0 Bytes (0%)
  • contentScripts: 38 Bytes (0%)
  • zip: 11.72 KiB (0.05%)

Comment thread shared/lib/trace.ts
const { data: attributes, name, parentContext, startTime, op } = request;
let parentSpan = resolveParentSpan(parentContext);

// `undefined` and `null` are different statements and must not be collapsed:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems to contradict the changes made in resolveParentSpan, where we return null if parentContext is null or undefined

Comment thread shared/lib/trace.ts
*/
function resolveParentSpan(parentContext: unknown): Sentry.Span | null {
if (!parentContext) {
// Nullish, not falsy: `TraceContext` is `unknown`, so `0` / `''` / `false`

@Gudahtt Gudahtt Aug 18, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: This explanation seems a bit excessive. Is it really helpful to list all nullish values here? Also, why use a different term here than the variable TraceContext vs parentContext.

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

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template risk:high size-M team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants