protected RaygunMessage BuildMessage(Exception exception, IList<string> tags, IDictionary userCustomData, RaygunIdentifierMessage userInfoMessage, DateTime? currentTime)
{
exception = StripWrapperExceptions(exception);
var message = RaygunMessageBuilder.New
.SetHttpDetails(_currentRequestMessage)
.SetTimeStamp(currentTime)
.SetEnvironmentDetails()
.SetMachineName(Environment.MachineName)
.SetExceptionDetails(exception)
.SetClientDetails()
.SetVersion(ApplicationVersion)
.SetTags(tags)
.SetUserCustomData(userCustomData)
.SetUser(userInfoMessage ?? UserInfo ?? (!String.IsNullOrEmpty(User) ? new RaygunIdentifierMessage(User) : null))
.Build();
var customGroupingKey = OnCustomGroupingKey(exception, message);
if(string.IsNullOrEmpty(customGroupingKey) == false)
{
message.Details.GroupingKey = customGroupingKey;
}
return message;
}