什么是“Invoke”以及为什么在 Azure Functions 中运行需要花费如此多的时间?

问题描述 投票:0回答:1

我正在尝试提高 Azure Function 的性能。 查看 Application Insights 依赖项遥测,我可以看到某些“调用”需要花费大量时间来运行。

有谁知道这个“Invoke”跟踪是什么以及如何提高其性能?

azure azure-functions azure-application-insights
1个回答
0
投票
  • 在您的情况下,Application Insights中的Internal中的Invoke类型开放遥测可能指的是Azure函数的调用,例如执行特定操作所需的时间诸如数据库查询、HTTP 请求或任何其他操作之类的操作。

  • 当您使用 SQL 触发的 Azure 函数时,只要 SQL 数据库中发生任何特定事件,触发器就会调用该函数。

  • 在您的情况下,“调用”遥测的持续时间为 2.5 秒似乎是由于数据库相关活动造成的。

  • 尝试将函数扩展到多个实例,以提高 Azure Function 的性能。

要检查函数应用的性能,请查询日志中的跟踪或检查指标和性能。

enter image description here

  • 我尝试创建 SQL 触发的 Azure 函数,但我的日志中没有 Invoke 类型。

以下是我的Azure功能的日志:

enter image description here

参考资料:

Azure Monitor 应用程序见解 - Azure Monitor

© www.soinside.com 2019 - 2024. All rights reserved.