Ign*_*cia 3 join kql azure-data-explorer appinsights
我使用以下查询从使用 AppInsights 失败并返回 400 的请求中获取 operationId 值:
requests
| project timestamp, id, operation_Name, success, resultCode, duration, operation_Id, cloud_RoleName, invocationId=customDimensions['InvocationId']
| where cloud_RoleName =~ 'xxxx' and operation_Name == 'createCase' and resultCode == 400
| order by timestamp desc
Run Code Online (Sandbox Code Playgroud)
我在以下查询中使用这些 operationId 值来获取所发生事件的日志:
traces
| union exceptions
| where operation_Id == '35edbc7c13f7ac4c85fa0b8071a12b72'
| order by timestamp asc
Run Code Online (Sandbox Code Playgroud)
有了这个,我得到了我想要的信息,但我需要多次编写和执行查询,所以我尝试在两个查询之间进行联接,但没有成功,因为我不是查询 AppInsights 的专家,而且我不确定关于如何加入工会,你能帮我吗?
小智 6
请尝试以下查询:
requests
| project timestamp, id, operation_Name, success, resultCode, duration, operation_Id, cloud_RoleName, invocationId=customDimensions['InvocationId']
| where cloud_RoleName =~ 'xxxx' and operation_Name == 'createCase' and resultCode == 400
| join (
traces
| union exceptions
) on operation_Id
| project-away operation_Id1
| order by timestamp asc
Run Code Online (Sandbox Code Playgroud)
有关运算符的更多详细信息join- https://learn.microsoft.com/en-us/azure/kusto/query/joinoperator
| 归档时间: |
|
| 查看次数: |
11410 次 |
| 最近记录: |