Azure洞察服务中的Application Insights自定义遥测

时间:2016-12-09 14:44:14

标签: botframework azure-application-insights azure-functions botconnector azure-bot-service

我已设法添加AI依赖项并能够导入/使用.csx文件,但我没有在Application Insights资源上看到任何遥测。

除了失败的请求和一个自定义事件“活动”之外,所有用法,浏览器,服务器图表都是空的。

在我的project.json我提到了所有AI依赖关系,如下所示:

{  "frameworks": {
"net46":{
  "dependencies": {
  "Microsoft.Bot.Builder.Azure": "3.1",
   "Microsoft.ApplicationInsights": "2.1.0",
  "Microsoft.ApplicationInsights.Agent.Intercept": "1.2.1",
  "Microsoft.ApplicationInsights.Azure.WebSites": "2.1.3",
  "Microsoft.ApplicationInsights.DependencyCollector": "2.1.0",
  "Microsoft.ApplicationInsights.PerfCounterCollector": "2.1.0",
  "Microsoft.ApplicationInsights.TraceListener": "2.1.0",
  "Microsoft.ApplicationInsights.Web": "2.1.0",
  "Microsoft.ApplicationInsights.WindowsServer": "2.1.0",
  "Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel": "2.1.0",
  "Microsoft.Web.Infrastructure": "1.0.0.0"
  }
}
}
}

然后我尝试在Dialog下的MessageReceivedAsync课程中使用如下方法:

await context.PostAsync($"{this.count++}: You said {message.Text}");
        TelemetryClient telemetry = new TelemetryClient();
        telemetry.TrackEvent("MessageReceivedAsync");
        context.Wait(MessageReceivedAsync);

任何人都可以帮助实施吗?

1 个答案:

答案 0 :(得分:1)

以下是使用Application Insights的工作示例的参考。

https://github.com/christopheranderson/azure-functions-app-insights-sample/tree/master/cs-http

我希望这有帮助!

相关问题