sentry-cocoa: Skip initialization if crash was caused by the SDK itself

When SentrySDK.start is called and a crash report is detected, skip initialization altogether in case that crash was caused by code within the SDK itself. Until new SDK version / app version it should stay disabled.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

In the case you describe where we cause an app launch crash and say we should let it happen so customers are aware, I disagree. That is the worst possible UX issue we could cause for end users. They still need the app to work, regardless of whether Sentry is working correctly. What you’re proposing is that Sentry is more important than the app, I disagree.

We could implement something like a heartbeat by which we present a notification in the frontend like “hey, we stopped receiving events from app version X at datetime Y, something may be wrong with your Sentry installation in production, please investigate and push out an update”

just remembered we wrote a blog post describing the strategy: https://medium.com/specto/preventing-repeated-crashes-on-launch-in-our-sdk-20cb4cc3e430

One idea that came up during a discussion, to avoid getting completely blind when we turn this off: Have a simple GET request to relay with /projectid/sdk.name/version so we can get metrics on the backend about this feature kicking in. This obviously is a rough idea and requires more discussions with other teams.

We could identify if a crash is coming from the SDK itself by looking at the stracktrace and sending a special type event to Sentry, so we know that we are crashing. Our users could get a special warning in Sentry so that they are aware something is wrong. Then they could ship a patch do downgrade to the latest stable version.