Differentiate between iOS errors and crashes

holgersindbaek

Posted on
Jun 22 2016

Crashes are much worse than errors on iOS, but if I track them both, they show up as the same on the Raygun dashboard. How do I differentiate between errors and crashes on Raygun?


Jason Fauchelle

Raygun

Posted on
Jun 22 2016

Hi Holgersindbaek,

One option here would be to try out the beta provider of Pulse for mobile. This beta provider will automatically tag reports with "UnhandledException" if they cause a crash. This tag will be visible on each crash report in your Raygun account. They do not yet get displayed on the grouping list though, so you'd need to drill into a group to see if a report contains this tag. There are plans to eventually display tags on the grouping list.

The beta provider can currently only be downloaded. here is a page that includes the download link for native iOS (let me know if you're actually using Xamarin.iOS): https://raygun.com/docs/pulse-for-mobile/ios-pulse

This provider is just a new version of whatever provider you currently have with all the same crash/error reporting functionality. It also includes Pulse for mobile beta support which you could optionally enable by following the instructions in the above link. This is a Real User Monitoring product that gives you insights into how your application is being used.

The automatic tagging of crashes is a feature for the crash-reporting side of the provider, but was added to the Pulse for mobile beta because the tag is useful for Pulse as well. We might also use this tag in other places too such as making crashes vs errors stand out more. When Pulse for mobile is out of beta, this new provider will simply become the next version of Raygun4iOS available from CocoaPods.

The other option without using the beta would be to tag the reports yourself. Since errors or exceptions that don't cause a crash need to be manually sent, you could send custom tags when calling the various Send functions.

I hope that helps. Please let me know if you have further questions about any of this and I'll help you out.

-Jason Fauchelle


holgersindbaek

Posted on
Jun 22 2016

That certainly clears things up. I understand how I can send an error to Raygun with a tag, but how to I send an exception to Raygun with a tag? I know the method for sending an exception with a tag, but then I'll have to catch the error. How do I send a bug report when the user opens my iOS app again?

Also, why do errors count for as much as exceptions in relation to the pricing model? I'm gonna have a lot more errors than exceptions, which might make me have to turn the error reporting off again.


Jason Fauchelle

Raygun

Posted on
Jun 22 2016

When it comes to exceptions that cause a crash, the Raygun4iOS provider takes care of these entirely including sending them when the app is restarted. It's currently not possible to change the data of crash reports before they're sent on a per-crash basis like with our other Raygun providers. We may add that functionality in a future version. You do have a lot more control over the data when you send errors or exceptions manually though - such as being able to set the tags on each one sent individually.

There is a function for manually sending tags with an error as well as a function for manually sending tags with an exception. It's just exceptions that cause a crash that you won't be able to tag separately. To clarify, the manual send functions are intended to send anything that doesn't cause a crash, such as errors or handled exceptions - these are things that Raygun4iOS can't detect itself. This still does give you the ability to tag non-crash reports which will distinguish them from crashes in the Raygun dashboard that wouldn't have a tag.

Or there's still the option to use the Pulse for mobile beta (or wait for it to be released) which will take care of tagging the crashes, plus allowing you to tag non-crashes differently.

Both errors and exceptions go through the same processing pipeline at Raygun and hence cost us the same amount to process and store. If we can process/store errors cheaper, then we'd be able to do the same for exceptions too - still meaning they count the same towards the pricing model. I hope that explains it.

Let me know if I can help you further with anything here.

-Jason Fauchelle


Reply