Add opt-in Sentry crash reporting#30
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rust panics and WebView errors reported via Sentry, strictly opt-in: first-run consent banner, Settings toggle, Rust-owned consent file read synchronously before tauri::Builder. Consent changes apply on next launch; both SDKs gate on the startup snapshot. Privacy: no default PII, hostname stripped, all automatic breadcrumbs disabled, before_send path/username scrubbing on both SDKs (Users/home/ root/Volumes/UNC shapes), terminal contents never touched. DSN compiled in only at CI release build (AGENTPANEL_SENTRY_DSN); dev builds and forks stay telemetry-inert. Transport has connect/request timeouts; source maps uploaded to Sentry and stripped from the installer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GrillerGeek
added a commit
that referenced
this pull request
Jul 26, 2026
Adds opt-in Sentry crash reporting (#30): Rust panics and WebView errors, first-run consent banner, privacy scrubbing on both SDKs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
tauri::Builder, since noAppHandleexists yet); changes take effect on next launch, never mid-session.Plan reference
docs/superpowers/specs/2026-07-23-crash-reporting-design.mddocs/guildhall/plans/2026-07-23-crash-reporting.mdTest plan
cargo test— 25/25 passing (includes 5 new scrubber-shape tests)npx vitest run— 96 passing (+7 pre-existingstore.notes.test.tsfailures, unrelatedlocalStorage.clearenvironment issue reproducible on a clean checkout)npm run buildandtsc --noEmit— clean@sentry/browserconfirmed dynamically imported behindactive_this_session(main bundle ~332KB → ~246KB)Reviewer notes
Six specialist reviewers plus the IDD tech-lead gate ran on this branch. Three HIGH findings surfaced after the first green build; all three were fixed in a scoped second round and re-verified CLOSED by the reviewers who originally raised them:
Breadcrumbsintegration was dropped entirely, and Rust-sidescrub_eventnow scrubsevent.breadcrumbsas defense-in-depth.unsetand surface a toast.sentry::initon the pre-Builderpath does blocking TLS-transport construction, and the default transport had no timeouts (panic-time flush could hang a dying process against a black-holed endpoint). A custom transport with connect/request timeouts was added. Lazy/deferred construction was evaluated and rejected as unverifiable againstsentry0.42's private worker/flush semantics. Accepted trade-off: a one-time bounded TLS-transport build (estimated ≤~20ms) remains on startup, but only for opted-in users on DSN-bearing builds.Other accepted, by-design trade-offs (documented, not defects):
Open items:
cargo tree -e features -p sentryas a sanity check —Cargo.lockshowssentry-actix/actix-webentries that should not be compiled in (performance reviewer info-level flag, unconfirmed).src/state/store.notes.test.tsfailure (7 tests,localStorage.clearnot a function) is untouched by this branch and fails on a clean checkout too.Runbook
Deploy plan
Before tagging a release: create the Sentry org/project (choose the US or EU data region), and enable the "do not store IP addresses" project setting so behavior matches the README's privacy claim. Add four repo secrets —
SENTRY_AUTH_TOKEN,SENTRY_ORG,SENTRY_PROJECT, andAGENTPANEL_SENTRY_DSN— the DSN is injected into thetauri-actionbuild environment inrelease.yml; if it's empty the build compiles telemetry-inert, and forks without the secret stay fail-closed automatically. Release version strings are aligned toagentpanel@<version>across the Rust SDK, the JS SDK, and the CI source-map upload step (previously mismatched, which would have prevented JS stack traces from ever symbolicating).What to watch (first 48h)
Confirm the source-map upload step succeeds in the release workflow. Check that the first WebView-originated event in Sentry shows readable, symbolicated frames rather than minified ones. Watch Sentry's Stats/Usage view against the 5k-events/month free-tier ceiling, and watch the Issues-to-Events ratio specifically — there is no client-side sampling, so a single crash-looping install can burn the monthly quota on its own. Because updater uptake is slow, near-silence in the first hours is expected and not itself a signal of failure. Remember the GitHub release is created as a draft and must be manually published before the updater will surface it to existing installs.
Rollback plan
The updater is forward-only — there is no way to roll an already-updated install back to a prior version. To stop ingestion instead, revoke or regenerate the DSN's client key in the Sentry project; this halts ingestion for all shipped versions instantly, at the cost of needing a new DSN (and a follow-up release) to resume. Short of full revocation, per-key rate limits and Sentry's Spike Protection are the available throttles.
On-call notes
No Sentry alert rules exist yet, and there is no paging integration configured — set this up post-merge, before relying on Sentry for incident detection.
🤖 Generated with Claude Code