Screenshot for the impatient:

What is it?
SafetyNet is a framework for error reporting and analysis for C# apps on Mono/GTK#. It is shown when an exception cannot be handled appropriately. The user, when faced with the exception can choose to send the stack-trace of the application along with any other information to a central server, where the developers can be informed of potential bugs.
It’s inspired in concept by Google/Mozilla’s Breakpad and the server-side component – “Socorro“. SafetyNet aims to be less of a install-and-forget solution to send dumps after the crash, but rather aims to try and fail gracefully, and give the user a choice to try and save the data before shutting the program down.
Why should one use it?
It is easy to integrate with your existing applications. Since all the failing stacktraces are in one place, it is easy enough to perform rudimentary frequency analysis to find out which sections of the code are failing more often.
Integration will require considerable amount of plumbing – handling crashes, recovery requests, save and die requests, etc are all to be implemented by the developer and application agnostic.
Clientside features (mostly not implemented yet):
- Show a GTK window presenting details about the error which can be filed as a bug report.
- Send a SOAP/vanilla POST request to a server containing debug information
- Integrates with System.Diagnostics by providing a TraceListener to also dump your logs to. The logs will be sent to the report (if allowed by the user).
- Investingating integration with System.Diagnostics.Debugger
- Hopeful integration with the global assembly cache – sending more diagnostic information
- Attaches screenshots of the failed program if required
Server-side features:
The server currently accepts an error report in XML format and stores it to couchdb. It currently does nothing except dump all the error reports together for downloading and offline processing.
Usage:
There’s a singleton class which acts as a central access point. It’s thread safe (I think) and is used to trigger the exception dialog and expose other functionality like the TraceListener, DebugListener, etc.
API:
TODO
Integrating with existing codebases:
A lot of design decisions were based on MonoDevelop’s ErrorDialog, which only shows a stacktrace. My guess will be to put everything in a try-catch
Current status of development:
SafetyNet was extracted from another top-secret project. It’s still in a very early stage with very few features – due to more time dedicated to aforementioned top-secret project. The code will be released as soon as the solution is sufficiently decoupled. All code will be MIT/X11.

Recent Comments