cmux/Sources/SentryHelper.swift
Lawrence Chen 53ef6a5f7d
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.
2026-02-23 17:11:01 -08:00

9 lines
334 B
Swift

import Sentry
/// Add a Sentry breadcrumb for user-action context in hang/crash reports.
func sentryBreadcrumb(_ message: String, category: String = "ui", data: [String: Any]? = nil) {
let crumb = Breadcrumb(level: .info, category: category)
crumb.message = message
crumb.data = data
SentrySDK.addBreadcrumb(crumb)
}