Skip to content

[simplex, simplex-desktop]: report errors to Sentry - #1399

Merged
seunlanlege merged 3 commits into
mainfrom
feat/simplex-sentry
Oct 14, 2026
Merged

seunlanlege merged 3 commits into
mainfrom
feat/simplex-sentry

Conversation

@ddboy19912

@ddboy19912 ddboy19912 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Sentry error reporting to the Simplex web UI and Desktop main process in release builds. CI bakes in the DSNs; local builds, unsigned validation builds, and Docker images send nothing.

  • SIMPLEX_ERROR_REPORTING=off disables reporting. The web UI waits for solver /health permission before initializing any Sentry integration, including sessions. Failed probes leave reporting inactive. Desktop skips initialization and excludes Sentry from the renderer CSP.
  • The shared @hyperbridge/simplex/error-reporting module strips recovery phrases regardless of case, including serialized and structured word arrays; key material and long tokens; absolute Windows, UNC, and POSIX paths; and remote URL paths and queries. Request bodies, cookies, and headers other than User-Agent are removed. Stack frames and grouping identifiers remain intact.
  • Desktop collects no native minidumps, local variables, screenshots, or preload injection. It uses Classic IPC without OpenTelemetry. The renderer CSP admits one canonical HTTPS ingest origin.
  • Renderer, GPU, and utility process failures report their process type and reason. Unexpected solver stops and loss of contact report the previous solver state and version. A running-session marker reports unclean desktop exits on the next launch, excluding sessions from before the current OS boot.
  • Hidden UI source maps are uploaded in CI and deleted before packaging. Desktop enters through dist/bootstrap.js, which enables source maps before loading main.js; its map ships in the app.

Operator documentation: evm/simplex/configuration.mdx. Feature note: docs/ai/changelog/2026-10-14-simplex-sentry-error-reporting.md.

Required repository configuration

  • Secrets: SIMPLEX_UI_SENTRY_DSN, SIMPLEX_DESKTOP_SENTRY_DSN, SENTRY_AUTH_TOKEN
  • Variables: SENTRY_ORG, SIMPLEX_UI_SENTRY_PROJECT

Validation

  • Simplex error-reporting, UI-server, and UI tests: 213 passed.
  • Desktop unit tests: 262 passed, one platform-specific skip; protocol integration tests: 11 passed.
  • Desktop and UI typechecks, production builds, desktop artifact verification, and lint on changed TypeScript files passed.
  • Regression coverage checks permission before SDK initialization, scrubbed events through an in-memory Sentry transport, recovery phrase formats, file paths, cyclic data, and mapped main-process stacks without a launch flag.
  • Native renderer-crash delivery remains unverified locally.

The web UI (@sentry/react) and the desktop main process (@sentry/electron)
report errors when CI bakes a DSN into the build. Events are scrubbed of
recovery phrases, keys, long tokens and provider URL paths before sending.
Operators opt out with SIMPLEX_ERROR_REPORTING=off: /health tells the UI
to drop events, and the desktop skips Sentry and keeps it out of the
renderer CSP. UI source maps are uploaded in CI and deleted from dist.
Renderer, GPU and utility process crashes and OOMs are sent as events.
An unexpected solver stop is reported where the desktop already notifies
the operator. A running-session marker in userData reports a main
process that ended without a clean quit on the next launch, ignoring
sessions that an OS shutdown or restart ended.
Gate SDK initialization because session envelopes bypass beforeSend. Scrub mixed-case and structured recovery phrases, absolute file paths, and cyclic data. Enable source maps in an entry module before loading the desktop main bundle.
@ddboy19912
ddboy19912 marked this pull request as ready for review October 14, 2026 13:07
@ddboy19912

Copy link
Copy Markdown
Contributor Author

@seunlanlege I've already set up the projects on Sentry and updated the Secrets/Variables

@seunlanlege
seunlanlege merged commit cc79df9 into main Oct 14, 2026
14 of 23 checks passed
@seunlanlege
seunlanlege deleted the feat/simplex-sentry branch October 14, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants