有没有办法在出现新异常时获得 Azure ApplicationInsights 通知?
我们正在使用 Azure 的 Application Insights。目前,我必须在每次部署后手动检查异常,以查看是否出现新的异常。有没有人找到一种在出现新异常时获得通知(通过 Azure 警报)的方法?例如,其他错误跟踪器(如 Sentry)支持此功能。
示例:
- 我们在 15:15 进行了部署
- 15:17 出现了先前未知的异常 一封
- 电子邮件发送给我,内容为“项目 Y 中出现了新异常 X”
以下是更清楚地演示这一点的屏幕截图:
We are using Application Insights by Azure. At the moment I have to manually check the exceptions after each deployment to see if a new one appeared. Has anyone figured out a way to get notified (via Azure alert) once a new exception appears? For example, other error trackers like Sentry support this.
Example:
- We did a deployment at 15:15
- A previously unknown exception appears at 15:17
- An email is sent to me with content "New exception X appeared in project Y"
Here is a screenshot demonstrating this a bit more clearly:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
智能检测正在被 alet 取代。获取通知的唯一方法是编写一个查询来查看新的异常。配置警报激活的时间段。
导航到 Azure 门户上的应用程序见解资源。
选择“监控”边栏选项卡下的“日志”。
构建日志查询并检查结果。
点击“+ 新警报规则”。
按如下方式配置您的警报:
只要过去 1 天的自定义日志搜索日志查询中的结果数大于 0,就会触发上述警报,并且每 6 小时评估一次。您可以自定义 根据需要的周期和频率。
您还可以阅读此详细指南用于解决 Azure Monitor 警报问题。请检查这是否有帮助。
Smart detections are being replaced by alets. The only way to get notifications is to write a query that will see your new exceptions. Configure the period to let alerts activate.
Navigate to the Application insights resource on Azure Portal.
Select Logs under the Monitoring blade.
Construct your log query and check the results.
Click on + New alert rule.
Configure your alert as follows:
The above alert fires whenever the count of results in Custom log search log query for the last 1 day is greater than 0, and is evaluated every 6 hours. You can customize the Period and frequency as needed.
You can also run through this detailed guide for troubleshooting problems with Azure Monitor alerts. Please check if this helps.
您可以尝试智能检测 ,特别是 异常数量异常增加。
如果您在发布之前从未遇到过特定异常,我会认为该类型的异常有所增加,您应该收到警报。尽管如果发生的异常很少,则不会发生警报,并且警报不会像您在问题中描述的那么详细。
You can try Smart Detection, specifically the alert for abnormal rise in exception volume.
If you never got a specificy exception before a release, I would consider that a rise in exceptions for that type and you should get an alert. Though the alert won't happen if there are very few exceptions occuring, and it won't be as detailed as you described in your question.