You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Azure Graph Explorer中查询无Workspace ID的Application Insights

Azure资源图查询有效性确认
  • 原查询存在局限性,无法完全准确筛选出无Workspace ID的Application Insights实例
  • 问题原因:未关联工作区的Application Insights,WorkspaceResourceId字段可能呈现两种状态:字段存在但值为空字符串,或字段本身不存在(值为null)。原查询仅判断了值为空字符串的情况,会漏掉字段不存在的实例。

推荐的准确查询

resources
| where type == "microsoft.insights/components"
| where isempty(properties['WorkspaceResourceId'])

或者等价写法:

resources
| where type == "microsoft.insights/components"
| where not(isnotempty(properties['WorkspaceResourceId']))
  • 说明:isempty()函数会同时识别字段值为空字符串或null的情况,能完整覆盖所有未关联工作区的Application Insights实例,确保查询结果准确。

内容的提问来源于stack exchange,提问作者itye1970

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 17:40:53