Application Insights - 交叉 Table 计算查询
Application Insights - Cross Table Calculation Query
我正在尝试总结异常计数、请求计数,然后是异常/请求比率。我无法确定如何计算这两个摘要,然后投影比率并 return 它。我正在尝试以下操作但没有成功:
let exceptionCount = exceptions
| where type == "ShiftDigital.InventoryServices.API.GetVehicleException" and outerMessage !contains("Invalid zip code")
| count as ExceptionCount;
requests
| count as RequestCount
| extend RequestCount / exceptionCount
有人可以就构造此查询的正确方法提出建议吗?
你不见了toscalar()
let exceptionCount = toscalar(exceptions
| where type == "ShiftDigital.InventoryServices.API.GetVehicleException" and outerMessage !contains("Invalid zip code")
| count);
let requestsCount = toscalar(requests
| count);
print requestCount * 1.0 / exceptionCount
我正在尝试总结异常计数、请求计数,然后是异常/请求比率。我无法确定如何计算这两个摘要,然后投影比率并 return 它。我正在尝试以下操作但没有成功:
let exceptionCount = exceptions
| where type == "ShiftDigital.InventoryServices.API.GetVehicleException" and outerMessage !contains("Invalid zip code")
| count as ExceptionCount;
requests
| count as RequestCount
| extend RequestCount / exceptionCount
有人可以就构造此查询的正确方法提出建议吗?
你不见了toscalar()
let exceptionCount = toscalar(exceptions
| where type == "ShiftDigital.InventoryServices.API.GetVehicleException" and outerMessage !contains("Invalid zip code")
| count);
let requestsCount = toscalar(requests
| count);
print requestCount * 1.0 / exceptionCount