protected RaygunMessage BuildMessage(Exception exception, IList<string> tags, IDictionary userCustomData)
{
string machineName = null;
try
{
machineName = UIDevice.CurrentDevice.Name;
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine("Exception getting device name {0}", e.Message);
}
var message = RaygunMessageBuilder.New
.SetEnvironmentDetails()
.SetMachineName(machineName)
.SetExceptionDetails(exception)
.SetClientDetails()
.SetVersion(ApplicationVersion)
.SetTags(tags)
.SetUserCustomData(userCustomData)
.SetUser(BuildRaygunIdentifierMessage(machineName))
.Build();
var customGroupingKey = OnCustomGroupingKey(exception, message);
if(string.IsNullOrEmpty(customGroupingKey) == false)
{
message.Details.GroupingKey = customGroupingKey;
}
return message;
}