Repository navigation
fix(sentry): bound desktop and daemon error volume (stable hotfix) - #8117
Merged
Merged
Conversation
(cherry picked from commit c7f0f45)
… titles (#8087) * fix(sentry): sample daemon errors by install and cap them per day Non-fatal daemon errors now send only from installs where sha256(install_id) % 10 == 0, tagged sample_rate=0.1; panics always send, tagged sample_rate=1. A per-install total of 25 errors per UTC day sits on top of the per-fingerprint budget. Model discovery failures and CODEX_ACCOUNT_SETUP_INCOMPLETE are user setup state and no longer reach Sentry, and only published stable or nightly versions initialize it. * fix(sentry): sample and budget desktop errors in Electron main Electron main now samples non-fatal desktop errors by install (the daemon's sha256(install_id) % 10 rule) and caps every event after scrubbing on its final fingerprint: 3 per fingerprint and 25 in total per install per UTC day, persisted to the AO data dir so reloads, new windows and restarts keep the budget. Main-process crashes and uncaught exceptions send from every install. The renderer's in-memory exception budget is gone. Sentry initializes only for release-stamped stable or nightly versions of a build marked AO_PUBLISHED_BUILD=1. * fix(sentry): give renderer errors real titles and debug IDs safeRendererFrames now keeps anonymous minified frames and named frames whose function is not allowlisted, as renderer_frame with the validated bundle location, so titles read 'Renderer TypeError in assets/useSessionWorkspaceFiles:123:45' instead of 'unknown'. Chunk debug IDs from the Sentry bundler plugin travel as debug_meta images, and main bundle frames and images are rewritten to app:/// URLs so uploaded source maps apply without sending install paths. * build(sentry): emit debug-ID source maps for release builds Release builds (AO_PUBLISHED_BUILD=1, set by build-artifacts.yml) now emit hidden source maps for the Electron main and renderer bundles and stamp them with Sentry debug IDs through @sentry/vite-plugin. Forge leaves every .map out of the package. With SENTRY_AUTH_TOKEN the plugin uploads to ao-electron itself; the secret-free artifact workflow instead hands the maps to the release conductor as sentry-sourcemaps-* run artifacts. * docs(telemetry): document Sentry install sampling, daily caps and published-only builds * fix(deps): restore the @pierre/theme lock entry pruned by npm 11 npm 11 dropped the optional peer entry when adding @sentry/vite-plugin; CI's npm 10.9.8 then rejected the lock as out of sync with package.json. * fix(sentry): keep a JS platform on scrubbed desktop events The rebuilt events dropped the SDK's platform, so Relay defaulted it to 'other' and Sentry skipped JS symbolication, ignoring the debug IDs. Renderer events are now 'javascript' and main events 'node'. (cherry picked from commit 6554304)
Contributor
🏆 Review leaderboardNov 3–10, 2026 · UTC
Ranked by distinct external PRs reviewed, then review rounds, then PR comments. Self-activity and bot activity are excluded. Show 6 more reviewers
|
3 of 4 tasks
This was referenced Nov 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Backports two Sentry volume fixes from
mainontostable(v0.14.10,033d597032), so they can ship as a stable patch without promoting the rest ofmain:f4d0ae6be2fix: bound Sentry capture and exclude expected provider states (fix: bound Sentry volume and filter expected failures #7878), cherry-picked fromc7f0f45677ef67238ebffix(sentry): bound desktop error volume and give renderer errors real titles (fix(sentry): bound desktop error volume and give renderer errors real titles #8087), cherry-picked from6554304e6f#7878 comes first because #8087 builds on it. On its own, #8087 conflicts on
stablein the daemonsentryobspackage and insentry-main.ts. With #7878 applied first, both commits apply without conflicts.Why
0.14.10 used up the Sentry quota in two days (details in #8087), so Sentry is dropping errors. Every 0.14.10 install sends every desktop and daemon error.
Before / After
telemetry_sentry_budget.jsonin the data directoryRenderer Error in unknown (unknown)build-artifacts.yml(AO_PUBLISHED_BUILD=1) with a stable or nightly version reportTesting
A PR into
stableskips the Go and frontend test jobs:go.ymlandfrontend.ymlrun them only whenbase_ref == 'main'. So I ran them locally onef67238ebf:go build ./...: clean.go veton the 7 touched packages: clean.go test -count=1ondaemon,httpd,observe/sentryobs,observe/trackerintake,service/agent,service/chatandsession_manager: all pass.npm ciinfrontend/succeeds with the backported lockfile.npm run typecheckpasses, withpackages/product-uiinstalled the way CI installs it.viteston the 11 touched test files: 462 passed.maincommit exactly. For fix(sentry): bound desktop error volume and give renderer errors real titles #8087 only the surrounding context lines differ.Not done: the full vitest and Go suites, a packaged
AO_PUBLISHED_BUILD=1build, and a desktop smoke test.Migrations
None in either commit.
Merging and release
Merge with a merge commit, as with #7383. Then the release conductor cuts the patch from the new
stablehead:The
build-artifacts.ymlrun publishessentry-sourcemaps-<platform>artifacts, kept for 1 day. Upload all four toao-electronwithsentry-cli sourcemaps upload --org untrivial-x0 --project ao-electron <dir>. Until then, frames stay minified.#8070 (promotion of
main) also uses0.14.11and fast-forwardsstableto7e807beb01. After this merges, that push is no longer a fast-forward, so #8070 needs its-s oursmerge ofstableredone and its version changed to0.14.12. #8070 already contains #7878 but not #8087.Risks
build-artifacts.ymlsends nothing to Sentry. This is intended.🤖 Generated with Claude Code