Upgrade Sentry: tracing, breadcrumbs, dSYM upload (#366)

* Upgrade Sentry: tracing, breadcrumbs, dSYM upload

- Enhanced Sentry SDK init with performance tracing (10% sample),
  explicit app hang timeout, stack trace attachment, and HTTP
  failure capture
- Added breadcrumbs for key user actions: workspace switch/create/close,
  split creation, command palette open/close, app focus — these give
  context to hang/crash reports
- Added dSYM upload step to nightly and release CI workflows so hang
  stacks are fully symbolicated (requires SENTRY_AUTH_TOKEN secret)
- Created SentryHelper.swift with lightweight breadcrumb helper

Closes https://github.com/manaflow-ai/cmux/issues/365

* Remove command palette breadcrumbs

Not useful for hang diagnosis — keep only workspace/tab/split/focus
breadcrumbs that correlate with heavy operations.
This commit is contained in:
Lawrence Chen 2026-02-23 17:11:01 -08:00 committed by GitHub
parent 396942c7e4
commit 53ef6a5f7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 58 additions and 0 deletions

View file

@ -699,6 +699,15 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
options.debug = false
#endif
options.sendDefaultPii = true
// Performance tracing (10% of transactions)
options.tracesSampleRate = 0.1
// App hang timeout (default is 2s, be explicit)
options.appHangTimeoutInterval = 2.0
// Attach stack traces to all events
options.attachStacktrace = true
// Capture failed HTTP requests
options.enableCaptureFailedRequests = true
}
if !isRunningUnderXCTest {
@ -804,6 +813,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
#endif
func applicationDidBecomeActive(_ notification: Notification) {
sentryBreadcrumb("app.didBecomeActive", category: "lifecycle", data: [
"tabCount": tabManager?.tabs.count ?? 0
])
let env = ProcessInfo.processInfo.environment
if !isRunningUnderXCTest(env) {
PostHogAnalytics.shared.trackDailyActive(reason: "didBecomeActive")