提交 91991346 编写于 作者: H Heejae Chang 提交者: GitHub

Merge pull request #19787 from heejaechang/NFWDump

explicitly add current process's dump in the non-fatal watson
......@@ -28,7 +28,15 @@ public static void Report(string description, Exception exception)
TelemetryService.DefaultSession.PostFault(
eventName: FunctionId.NonFatalWatson.GetEventName(),
description: description,
exceptionObject: exception);
exceptionObject: exception,
gatherEventDetails: arg =>
{
arg.AddProcessDump(System.Diagnostics.Process.GetCurrentProcess().Id);
// 0 means send watson, otherwise, cancel watson
// we always send watson since dump itself can have valuable data
return 0;
});
}
/// <summary>
......@@ -43,7 +51,12 @@ public static void Report(string description, Exception exception, Func<IFaultUt
eventName: FunctionId.NonFatalWatson.GetEventName(),
description: description,
exceptionObject: exception,
gatherEventDetails: callback);
gatherEventDetails: arg =>
{
// always add current processes dump
arg.AddProcessDump(System.Diagnostics.Process.GetCurrentProcess().Id);
return callback(arg);
});
}
}
}
......@@ -43,7 +43,15 @@ public static void Report(string description, Exception exception)
SessionOpt?.PostFault(
eventName: FunctionId.NonFatalWatson.GetEventName(),
description: description,
exceptionObject: exception);
exceptionObject: exception,
gatherEventDetails: arg =>
{
arg.AddProcessDump(System.Diagnostics.Process.GetCurrentProcess().Id);
// 0 means send watson, otherwise, cancel watson
// we always send watson since dump itself can have valuable data
return 0;
});
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册