嗨我正在尝试通过该运行ID对与运行ID相关的一些值进行分组。
所以我拥有的是:
AzureDiagnostics
| where resource_workflowName_s =="RABE_REST_CARUS_V2"
| where resource_actionName_s != ""
and resource_actionName_s == "Initialize_variable"
or resource_actionName_s == "Compose"
or resource_actionName_s == "RabeValidationCarusV2Test"
or resource_actionName_s == "HTTP"
| where status_s == "Succeeded"
| extend Duration = iff(isnotempty(endTime_t), todouble(endTime_t - startTime_t ) / 10000000, double(null))
| project RunId = resource_runId_s, Actions = resource_actionName_s , Duration
我得到了这个结果:
我想要的是将与一个RunID相关的操作的持续时间相加 我现在拥有的是每个runID的一个动作及其持续时间......
希望有道理吗?
答案 0 :(得分:0)
找到答案:
AzureDiagnostics
| where resource_workflowName_s =="RABE_REST_CARUS_V2"
| where resource_actionName_s != ""
and resource_actionName_s == "Initialize_variable"
or resource_actionName_s == "Compose"
or resource_actionName_s == "RabeValidationCarusV2Test"
or resource_actionName_s == "HTTP"
| where status_s == "Succeeded"
| extend Duration = iff(isnotempty(endTime_t), todouble(endTime_t - startTime_t ) / 10000000, double(null))
| project RunId = resource_runId_s, Actions = toobject(resource_actionName_s) , Duration
| summarize Actions = makeset(Actions), Durations = makeset(Duration), DurationSum = sum(Duration) by RunId
| where DurationSum > 15