I can help you with this. Everything you mentioned in your follow up comment is correct. The RaygunClient adds a flag to the Data collection of any Exception instance that it sends to Raygun. If the RaygunClient sees flagged Exception instances again, it avoids double sending them.
The RaygunClient automatically sends unhandled exceptions if you call the Attach or AttachCrashReporting methods. Raygun4Net will still works fine if you don't call either of those methods, and just want to have full control of sending exceptions reports, including unhandled exceptions. So the easiest way to get the behaviour you described in your first comment would be to not call Attach or AttachCrashReporting, and instead create the RaygunClient with just the static Initialize method, or constructor that takes an api key.
A couple of things to note about not using Attach or AttachCrashReporting:
- The reports will no longer have the "UnhandledException" tag for exceptions sent via an unhandled exception callback. This tag is used by the Raygun service for statistics related to exceptions that cause an app crash vs exceptions that don't crash the app. (generally, an exception that hits an unhandled exception handler will crash the application). You could easily add this tag in to your own unhandled exception callback though.
- For some platforms, there are multiple unhandled exception callbacks managed by the Attach/AttachCrashReporting method. So if you don't call either of those, you may want to attach the additional callbacks manually too. You can check the Raygun4Net source code to find out what to attach to. Here is the Android code for example: https://github.com/MindscapeHQ/raygun4net/blob/master/Mindscape.Raygun4Net.Xamarin.Android/RaygunClient.cs#L386
If you'd prefer to leave Raygun4Net to report unhandled exceptions for you, then you'd want to avoid calling the Send method inside your own unhandled exceptions callback. Instead, you could use the RaygunClient SendingMessage or CustomGroupingKey events. These events get called when Raygun4Net is about to serialize and send the exception report to Raygun. The callback of these events includes the RaygunMessage object, to which you can append tags and custom data to. The CustomGroupingKey also includes the Exception object, so use that one if you need the Exception to work out what tags/custom data you want to add.
Indeed our documentation could be improved for this use case.
Please let us know if you have further questions about any of this and we'll help you out.