在自定义 属性 上查询 AppInsights
Query AppInsights on a Custom Property
我记录了以下内容。有没有办法在 prop_CorrelationId in where 子句中查询 AppInsights?我尝试了以下方法,但都没有 return 信息。注意第一个违背“请求”,第二个违背“痕迹”:
let numberOfDaysAgo = ago(6d);
requests
| where timestamp > numberOfDaysAgo and customDimensions.prop_CorrelationId == "568abba7-6601-4159-a3b1-ef27b2437473"
let numberOfDaysAgo = ago(6d);
traces
| where timestamp > numberOfDaysAgo and customDimensions.prop_CorrelationId == "568abba7-6601-4159-a3b1-ef27b2437473"
显然,您在 prop_CorrelationId
.
中错误地使用了 _
而不是 __
(它是双 _
)
所以请在查询中使用 prop__CorrelationId
而不是 prop_CorrelationId
。
例如:
let numberOfDaysAgo = ago(6d);
requests
| where timestamp > numberOfDaysAgo and customDimensions.prop__CorrelationId == "568abba7-6601-4159-a3b1-ef27b2437473"
我记录了以下内容。有没有办法在 prop_CorrelationId in where 子句中查询 AppInsights?我尝试了以下方法,但都没有 return 信息。注意第一个违背“请求”,第二个违背“痕迹”:
let numberOfDaysAgo = ago(6d);
requests
| where timestamp > numberOfDaysAgo and customDimensions.prop_CorrelationId == "568abba7-6601-4159-a3b1-ef27b2437473"
let numberOfDaysAgo = ago(6d);
traces
| where timestamp > numberOfDaysAgo and customDimensions.prop_CorrelationId == "568abba7-6601-4159-a3b1-ef27b2437473"
显然,您在 prop_CorrelationId
.
_
而不是 __
(它是双 _
)
所以请在查询中使用 prop__CorrelationId
而不是 prop_CorrelationId
。
例如:
let numberOfDaysAgo = ago(6d);
requests
| where timestamp > numberOfDaysAgo and customDimensions.prop__CorrelationId == "568abba7-6601-4159-a3b1-ef27b2437473"