首页 > 解决方案 > 获取 Azure Monitor 日志查询中失败请求的 Blob 名称列表

问题描述

有一个 blob 触发器函数失败,其中一些是由System.NullReferenceException. 是否可以获得导致此异常的 blob 名称列表?该日志查询会是什么样子?这是我到目前为止的查询,但不确定从这里去哪里获取导致空引用异常的 blob 名称列表。

requests 
| where success == false

端到端交易细节

标签: azureazure-log-analyticsazure-data-explorerazure-monitoring

解决方案


首先,您应该从dependencies表而不是requests表中查询。

然后要获取失败的 blob 列表,您可以使用如下查询:

dependencies 
| where timestamp >ago(7d) // here the time range is set to the latest 7 days, you can change it.
| where success == "false" 
| where type == "Azure blob" 
| project customDimensions.Blob

推荐阅读