azure - 如何利用应用程序洞察进行分布式跟踪/跟踪

标签 azure azure-functions azure-application-insights azure-monitoring azure-monitor

我正在 Azure 中使用多个资源,流程如下所示:

  1. 从 sftp 获取文件
  2. 使用 http 调用的数据丰富文件
  3. 将消息放入队列
  4. 处理消息
  5. 调用一些外部电话
  6. 传递数据

我们如何跟踪上述过程中特定“运行”的位置?

我们可以简单地创建一个 guid 并将其传递到应用洞察中吗?

最佳答案

这确实是 Distributed tracing 的完美场景!

处理这些数据有两种主要方法,使用 Transaction Diagnostics View ,或 Application Map看法。前者有助于根据每个请求查找性能问题,而后者则提供不同系统之间交互的拓扑 View 。

大多数依赖项由 Application Insights SDK 自动收集,因为它通过依赖项自动收集器原生支持分布式跟踪,但您也可以使用 TrackDependency用于手动跟踪它们的 API。

在关联遥测数据时,您建议的 guid 采用 operation_Id 的形式,它将遥测数据与所执行的逻辑操作相关联。要了解更多有关其幕后工作原理的信息,请查看 Telemetry correlation in Application Insights .

对于其他阅读,还有一篇简洁的博客文章 here用一个例子来说明同样的情况。

希望这有帮助!

关于azure - 如何利用应用程序洞察进行分布式跟踪/跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58330850/

相关文章:

c# - 如何在 ILogger 中刷新应用程序洞察

azure - 删除 Azure SDK 生成的日志

azure - 错误: Run-From-Zip is set to a remote URL using WEBSITE_RUN_FROM_PACKAGE Azure Function with deployed DevOps

c# - Power BI Embedded PostImportWithFile 返回 BadRequest

azure - 什么决定了 Azure 中应用服务的出站 IP 地址?

azure-functions - VS2022 无法创建 Azure Functions 项目

php - Azure 函数应用程序 - PHP $_GET/$_POST/$_REQUEST

azure - 使用 DTU 定价模型的副本

Azure函数应用程序间歇性返回502 Bad Gateway

azure - Application Insights URL Ping 测试 - GUID 实际上是否需要唯一?