在 Azure 中实施分布式跟踪

Implementing distributed tracing in Azure

我们正在使用逻辑应用程序、API 和 Azure Functions 的组合在 Azure 中构建集成。我们有从源到目的地端到端跟踪事务的要求,即分布式跟踪。我们需要能够跟踪自定义字段,例如 orderId。非常感谢任何关于如何最好地实现这一点的建议、文章、示例、视频的指针。

我觉得你可以考虑使用Application Insights

它有无代码和基于代码两种模式,可以自动跟踪请求/依赖等。您还可以使用它的built-in method跟踪任何自定义字段。

而且 azure 函数很容易与应用程序洞察集成,请参阅 here 了解更多详细信息。

对于 Web api,您可以轻松地使用内置方法或使用基于代码或无代码的方法对其进行监控。

我对此做了更多的研究。我相信使用 Azure Monitor 是正确的方法,如下所述:https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/logic-apps/monitor-logic-apps-log-analytics.md. What's outlined here is really good as it explains the steps required to setup Azure Monitor. Azure Monitor in combination to what's described in the following article around end-to-end correlation with custom properties should give me what I need: https://yourazurecoach.com/2018/08/05/end-to-end-correlation-across-logic-apps/