azure app insights 警报以监控 azure bot 框架项目中的运行状况

azure app insights alert to monitor health in a azure bot framework project

我需要为 azure appservice 资源配置警报,其中我有一个从 Microsoft bot 框架创建的 bot,它已集成到 azure app insights 中。

我的问题是我应该采用什么参数来配置 azure 应用程序洞察警报,以便我可以正确衡量我的 bot 应用程序的运行状况并确保它符合良好做法?

在我看来,如果你想在不可用的机器上发出警报,你可以在你的代码中设置应用程序洞察,它会send heartbeat by default. And you can follow this tutorial为你的机器人添加遥测。(主要添加Microsoft.Bot.Builder.Integration.ApplicationInsights.Core NuGet封装并修改Startup.cs中的ConfigureServices()方法和一些其他设置)

之后你的bot程序会发送heartbeat,详情你自己看 via customMetrics | where name == "HeartbeatState". Then you can create alert rules