Tags not send with exception in Raygun4Net version 4.2.0
Steffen Thomsen
Posted on
Feb 04 2015
As described, tags are not shown in the RayGun dashboard, when sending an exception in version 4.2.0 but the same code in the previous version installed 2.0.6, is displayed (Xamarin component store).
private void AndroidEnvironmentOnUnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs raiseThrowableEventArgs) {
RaygunClient.Current.Send(raiseThrowableEventArgs.Exception, new List
}
Jason Fauchelle
Raygun
Posted on
Feb 04 2015
Hi Steffen,
Thanks for contacting us about this. There are 2 changes between those versions that could together be causing this:
- The Attach method will now attach a handler to the AndroidEnvironment.UnhandledExceptionRaiser.
- The RaygunClient now prevents the same exception from being sent more than once. This is because it's very easy to get into scenarios where you double (or more) send all your exceptions - which would not be fair to fill up your account with.
So what I think is happening, is you're calling RaygunClient.Attach(), and then later you're attaching your own handler to AndroidEnvironment.UnhandledExceptionRaiser. This means that the built-in RaygunClient handler will get the exception first and send it (without tags). Next, your own handler is hit, but when attempting to send, the RaygunClient notices that the same exception has been already been sent, and so does not double sent - meaning your tags never make it to Raygun.
Fortunately, this is very easy for you to fix in your scenario. Simply attach your AndroidEnvironment.UnhandledExceptionRaiser handler first, and then do the RaygunClient.Attach call.
Apologies for the trouble and breaking change here. Please let me know if you have questions about this or if I have misunderstood what's happening here.
-Jason Fauchelle
Steffen Thomsen
Posted on
Feb 04 2015
Spot on.
Thanks for the quick response.
Sincerely
Steffen Thomsen