通过多个 Azure Application Insights 查询日志
Query logs through multiple Azure Application Insights
我正在开发一个包含多个 Azure 函数应用程序的 Azure 项目。一个函数应用链接到一个 Application Insights。因此,我们拥有与 Applications Insights 一样多的功能应用程序。
这些functions app之间会进行对话,有些进程可以通过多个functions app。在 Azure 函数上,我添加了带有自定义 EntityID 的日志,这个 EntityID 在所有函数应用程序之间都是相同的。
现在我的问题是:如何检索所有 Applications Insights 上具有相同 EntityID 的所有日志?
赞:
traces
| where operation_Name == "TestLogManagement"
| where customDimensions.EventId == 888
但在几个 Applications Insights 上。
我知道我们可以通过标签对多个 Applications Insights 进行重组,但是在创建日志后无法检索它。
app('app1').traces
| union app('app2').traces
| where * contains "42"
| summarize count() by appId
请看这里:
您也可以在 workbooks in azure monitor 中执行此操作,因此您无需在查询中对应用名称进行编码,您只需编写所需的查询并选择 AI 资源或 LA 工作区的多个实例
我正在开发一个包含多个 Azure 函数应用程序的 Azure 项目。一个函数应用链接到一个 Application Insights。因此,我们拥有与 Applications Insights 一样多的功能应用程序。 这些functions app之间会进行对话,有些进程可以通过多个functions app。在 Azure 函数上,我添加了带有自定义 EntityID 的日志,这个 EntityID 在所有函数应用程序之间都是相同的。
现在我的问题是:如何检索所有 Applications Insights 上具有相同 EntityID 的所有日志?
赞:
traces
| where operation_Name == "TestLogManagement"
| where customDimensions.EventId == 888
但在几个 Applications Insights 上。
我知道我们可以通过标签对多个 Applications Insights 进行重组,但是在创建日志后无法检索它。
app('app1').traces
| union app('app2').traces
| where * contains "42"
| summarize count() by appId
请看这里:
您也可以在 workbooks in azure monitor 中执行此操作,因此您无需在查询中对应用名称进行编码,您只需编写所需的查询并选择 AI 资源或 LA 工作区的多个实例