【发布时间】:2015-06-25 11:41:08
【问题描述】:
我正在将 Application Insights 用于 WPF 应用程序。正在跟踪 PageViews 和自定义事件。
现在我想跟踪崩溃。我的想法是:
private void AppDispatcherUnhandledException(object sender,
DispatcherUnhandledExceptionEventArgs e)
{
telemetryClient.TrackException(e.Exception);
telemetryClient.Flush();
}
当发生未处理的异常但未在 Application Insights 门户中显示为“崩溃”时,将调用该代码。我在某处读到,当应用程序没有真正崩溃时,TrackException 不算作“崩溃”。
桌面(例如 WPF)应用程序必须使用 Application Insights 的低级 API。我还没有找到一种方法来告诉 Application Insights WPF 应用程序正在崩溃。
我该怎么做?
【问题讨论】:
标签: c# wpf desktop azure-application-insights