Настраиваемая телеметрия Application Insights в 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 ответ

Вот ссылка на рабочий образец с использованием Application Insights.

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

Надеюсь, это поможет!