使用 Azure Application Insights

已完成

Azure Application Insights 是 Azure Monitor 的一项功能,可用于监视实时应用程序。 可以将 Application Insights 与应用服务配置相集成,用于自动检测应用中的性能异常。

Application Insights 旨在帮助持续提高应用的性能和可用性。 该功能提供了强大的分析工具,有助于诊断问题并了解用户在应用中实际执行的操作。

有关 Application Insights 的注意事项

让我们来了解适用于 Azure Monitor 的 Application Insights 的一些特征。

  • Application Insights 适用于各种平台,包括 .NET、Node.js 和 Java EE。

  • 此功能可用于在本地、混合环境或任何公有云中托管的配置。

  • Application Insights 与 Azure DevOps 流程集成,并具有许多开发工具的连接点。

  • 可通过与 Visual Studio App Center 集成来监视和分析移动应用中的数据。

Diagram that shows Azure Application Insights receiving information from web pages, client apps, and web services, which is transferred to Alerts, Power BI, and Visual Studio.

使用 Application Insights 时的注意事项

Application Insights 非常适合支持开发团队。 此功能可帮助开发人员了解应用的运行性能和使用方式。 请考虑在应用服务配置方案中监视以下项。

  • 请考虑请求速率、响应时间和失败率。 了解最受欢迎的页面、时段以及用户的位置。 查看哪些页面效果最好。 当有较多请求时,如果响应时间长且失败率高,则可能存在资源问题。

  • 请考虑依赖项率、响应时间和失败率。 使用 Application Insights 发现外部服务是否降低应用性能。

  • 请考虑异常。 分析聚合的统计信息,或选择特定实例并钻取堆栈跟踪和相关请求。 报告服务器和浏览器异常。

  • 请考虑页面视图和负载性能。 收集用户浏览器报告的页面视图数并分析加载性能。

  • 请考虑用户和会话计数。 Application Insights 有助于跟踪连接到应用的用户和会话数。

  • 请考虑性能计数器。 从 Windows 或 Linux 服务器计算机添加 Application Insights 性能计数器。 监视 CPU、内存、网络使用情况等的性能输出。

  • 请考虑主机诊断。 将 Docker 或 Azure 中的诊断集成到应用 Application Insights 中。

  • 请考虑诊断跟踪日志。 从应用实现跟踪日志,以帮助将跟踪事件与请求相关联并诊断问题。

  • 请考虑自定义事件和指标。 编写自己的自定义事件和指标跟踪算法作为客户端或服务器代码。 跟踪业务事件,例如销售的商品数或获胜的游戏次数。