From 1a14c1f677cec14c79c7de1505ccf789eb5c64cf Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 16:06:48 +0000 Subject: [PATCH] Tag the test crash in Sentry "Crash the app" now sets crash_type:forced on Sentry's scope before it crashes, the same tag the desktop Clementine gives crashes made with --crash, so test crashes can be filtered out of real ones. Sentry's SDK saves the scope with its crash report, so the tag reaches the event made from it on the next start. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01R2bAq51UNk9WZ9L68KVQMA --- App/Support/CrashReporting.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/App/Support/CrashReporting.swift b/App/Support/CrashReporting.swift index 6a78b49..6cf0956 100644 --- a/App/Support/CrashReporting.swift +++ b/App/Support/CrashReporting.swift @@ -61,7 +61,14 @@ final class CrashReporting { /// Crashes the app, to try crash reports out. Only TestFlight and debug builds offer it, and /// it crashes under Xcode's debugger without a report. + /// + /// The report is tagged `crash_type:forced`, as the desktop Clementine tags crashes made with + /// `--crash`, so it can be told apart from real crashes in Sentry. The SDK saves the scope with + /// its report of the crash, so the tag is on the event it makes from it on the next start. func crash() { + SentrySDK.configureScope { scope in + scope.setTag(value: "forced", key: "crash_type") + } SentrySDK.crash() }