【发布时间】:2016-03-18 06:46:23
【问题描述】:
我正在使用以下方法记录不同的异常,该方法接受异常以及一些上下文信息字符串。
public void LogException(string notes, Exception e)
{
var properties = new Dictionary<string, string>()
{
{ "notes", notes }
};
telemetry.TrackException(e, properties);
}
异常被正确报告,但它们丢失了
- 自定义属性“notes”
- 调用堆栈
【问题讨论】:
-
只是为了排除显而易见的问题,你确定你的 LogException 方法被调用了吗?应用程序洞察会自动记录异常,因此您可以看到默认日志记录。至于调用堆栈,因为 UWP 应用程序编译为 .net 本机,所以您无法获得有意义的调用堆栈(如果有人知道不同,请分享,因为这非常令人沮丧)
标签: c# uwp azure-application-insights