A false alarm in crash reporting is worse than a quiet dashboard. If your team sees “watchdog termination” events that never happened, people stop trusting the data, and a real launch problem gets lost in the noise.
Sentry Cocoa 9.32.0 fixes a case of this. After you call SentrySDK.close(), the next launch could report a watchdog termination even though the app was closed on purpose. The same release makes flush and close wait for transactions that are still being captured on a background thread, and keeps pending Session Replay video when replay.stop() follows flush().
Data Points to Track
watchdog_termination_countper release, per daylaunches_after_close, the count of launches that follow a deliberate SDK closeclose_reason(logout, consent withdrawn, test reset, environment switch)transactions_pending_at_closeandtransactions_delivered_after_flushreplay_segments_lostafter stop and flushsdk_versionandapp_versionos_versionanddevice_modeltime_since_last_launchto spot repeated reopen patterns
Setup Steps
- Find every call to
SentrySDK.close()in your app. Common places are logout, consent screens and debug menus. - Log a local event with a
close_reasoneach time, so you can match it with later reports. - Upgrade to Sentry Cocoa 9.32.0 or later.
- Call
flushbeforecloseif you need pending transactions delivered, and give it a sensible timeout. - Test the sequence: start, close, kill, relaunch. Confirm no watchdog report appears.
- Compare watchdog counts for two releases before and after the upgrade.
- Filter your dashboard so legitimate watchdog terminations, caused by real main thread blocks, stay visible.
Actionable Insights
First, check whether watchdog reports cluster after launches that follow a close. If they do, you were looking at false positives, and your true watchdog rate is lower than it seemed. Update any targets or alerts that were set using the inflated number.
Second, if watchdog reports remain after the upgrade, they are probably real. Look at launch time, main thread work and what ran in the first seconds. Those are the cases worth engineering time.
Third, review how often you close the SDK. Apps that close and restart it on every consent change may lose data in the gap. Reduce that churn where you can, and always flush first.
Lastly, check that transactions and replays still arrive for sessions that end in a close. Missing tail data in those sessions can make a flow look shorter or more broken than it was.
Document what you learn. A short note in your release checklist, covering when the SDK is closed, why, and what you expect on the next launch, saves the next engineer from chasing the same ghost. It also makes it easy to explain any change in watchdog numbers to product managers, who usually only see the chart.