Repository navigation
revert(desktop): drop the renderer heap-trajectory Sentry instrumentation - #6499
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThe PR removes heap trajectory types and utilities. Sentry initialization no longer starts renderer heap sampling. ChangesRenderer heap tracking removal
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR removes the permanent renderer heap trajectory instrumentation and restores the prior behavior; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Problem
#6496 added a permanent renderer heap sampler and a Sentry scope trajectory to make two OOM minidumps (DESKTOP-Y3, DESKTOP-Y8) diagnosable. On review after merge, it does not clear the bar for permanently maintained code.
Why it is being reverted
The mechanism was correct — renderer
setTag/setExtragenuinely do reach a minidump, andcontextsgenuinely would not — so this is not a revert for being broken. It is a revert for not being worth its keep:performance.memoryis quantized and refreshed far more coarsely than 5 minutes without--enable-precise-memory-info, which we deliberately do not set. Early history therefore carries repeated identical readings. The stride-doubling self-corrects on multi-day sessions, but the chosen interval buys nothing over a much cheaper one.recordHeapSample's halving decimation andsummarizeHeap's growth-rate maths shipped with no unit tests.JSON.stringify, not JS-heap accumulation. A 5-minute sampler ofusedJSHeapSizecannot see that spike.What is kept
Nothing is lost by reverting. The findings that came out of the work are recorded outside the code:
tags/extra/user/attachments/breadcrumbs;setContextis dropped byhandleScopein@sentry/electron7.16.0. Anyone adding renderer enrichment later needs this and should not rediscover it.v8-oom-*crash keys for V8 heap-limit aborts (Y3 has them), and none for PartitionAlloc aborts (Y8 has none). Uptime is already derivable fromapp.app_start_time.If this family recurs at volume, the right move is to fix the retainer, not to instrument around it.
Verification
bunx biome check apps/desktop/src/renderer/lib/sentry.ts→Checked 1 file in 10ms. No fixes applied.cd apps/desktop && bun run typecheck→ clean, no diagnostics.git diff 92fab2ca5 HEADis empty: the tree is byte-identical to the commit immediately before fix(desktop): carry a renderer heap-growth trajectory on the Sentry scope #6496, so this is an exact revert with no incidental changes.Refs DESKTOP-Y3
Refs DESKTOP-Y8
Summary by cubic
Reverts the renderer heap-trajectory Sentry instrumentation from #6496 to remove a permanent 5-minute heap sampler and scope tags/extras that don’t meet our bar for long-term maintenance or diagnosability.
apps/desktop/src/renderer/lib/heap-trajectory.tsand removes the sampler fromapps/desktop/src/renderer/lib/sentry.ts.renderer_heapextra, norenderer.heap_usedtag, and no periodicperformance.memoryreads.v8-oom-*keys as before.Written for commit 733de5c. Summary will update on new commits.
Summary by CodeRabbit