我有一个日志条目,它测量应用程序中不同事件所花费的时间。如何获取需要最多时间的事件的名称
例如,在以下情况下,Update
操作将花费最长时间。我将如何提取?
{
"TotalDuration": 409412,
"PhaseDurations": {
"ExternalService": {
"Duration": 406861,
"Count": 31,
"Details": {
"Create": {
"Duration": 78,
"Count": 10
},
"Read": {
"Duration": 65,
"Count": 8
},
"Update": {
"Duration": 406363,
"Count": 6
},
"Delete": {
"Duration": 238,
"Count": 7
}
}
}
}
以下查询检索所有操作。但是我只希望该操作花费最多的时间。
Events
| where Timestamp > ago(1h) and LogId =~ 'xxxxxxxx-xxxx-xxxx-xxxx-df251043432e'
| project Timestamp, App, Log.PhaseDurations.ExternalService.Details
| order by Timestamp
| limit 10