ApplicationInsights TrackException()不记录stacktrace

时间:2017-03-03 13:57:23

标签: azure azure-application-insights

ApplicationInsights TrackException()未记录堆栈跟踪。

电话很简单,就像这样:

this.telemetry.TrackException(ex, properties);

异常(当然是抛出和捕获)在传递给TrackException()时有一个堆栈跟踪。

应用程序见解生成的json是这样的(我可以在输出窗口中看到它):

{
  "name": "Microsoft.ApplicationInsights.ff0c6b7759fa46cdbec661fecb9efb4d.Exception",
  "time": "2017-03-03T13:31:15.5946550Z",
  "iKey": "ff0c6b77-59fa-46cd-bec6-61fecb9efb4d",
  "tags": {
    "ai.cloud.roleInstance": "POSTAZIONE-DEV1",
    "ai.internal.sdkVersion": "dotnet:2.2.0-54037"
  },
  "data": {
    "baseType": "ExceptionData",
    "baseData": {
      "ver": 2,
      "properties": {
        "Keywords": "0x0000000000000000",
        "EventName": "ExceptionInHealthTrackerProc",
        "Level": "Always",
        "ProviderName": "Gamshy.RandomNumberGenerator.Service.ServiceEventSource",
        "EventId": "-1"
      },
      "exceptions": [
        {
          "id": 51763190,
          "typeName": "System.Exception",
          "message": "Tentativo di divisione per zero.",
          "hasFullStack": true
        }
      ]
   }
  }
}

ApplicationInsights nuget包是Microsoft.ApplicationInsights 2.2.0

这是我可以在Azure门户中从Google Analytics查看的数据的屏幕截图。 enter image description here

有什么想法吗? AI库是否应该不记录堆栈跟踪?

1 个答案:

答案 0 :(得分:0)