Azure application insights AppInsights analytics查询以在单个结果表中显示通过、失败和响应时间 //此查询计算请求持续时间百分比并按名称计数 让开始=日期时间(“2021-04-13T18:35:00.000Z”); 让结束=日期时间(“2021-04-13T18:52:00.000Z”); 时间粒度=5m; 让数据集=请求 //可以在此处应用其他过滤器 |其中时间戳>开始和时间戳开始和时间戳0 |按失败计数说明订购 输出 操作名称、失败计数、总数计数 总共10 100人 testreq,10100

Azure application insights AppInsights analytics查询以在单个结果表中显示通过、失败和响应时间 //此查询计算请求持续时间百分比并按名称计数 让开始=日期时间(“2021-04-13T18:35:00.000Z”); 让结束=日期时间(“2021-04-13T18:52:00.000Z”); 时间粒度=5m; 让数据集=请求 //可以在此处应用其他过滤器 |其中时间戳>开始和时间戳开始和时间戳0 |按失败计数说明订购 输出 操作名称、失败计数、总数计数 总共10 100人 testreq,10100,azure-application-insights,Azure Application Insights,您能否共享一个查询,该查询将显示请求响应时间和通过与失败。 例子 操作名称,总计数,通过,失败,平均持续时间,百分位数持续时间50, 百分位数持续时间95,百分位数持续时间99 总的来说,100,90,10,2.1,2.3,2.3,2.5 testreq,100,90,10,2.1,2.3,2.3,2.5 // this query calculates request duration percentiles and count by name let start=datetime("

您能否共享一个查询,该查询将显示请求响应时间和通过与失败。 例子 操作名称,总计数,通过,失败,平均持续时间,百分位数持续时间50, 百分位数持续时间95,百分位数持续时间99 总的来说,100,90,10,2.1,2.3,2.3,2.5 testreq,100,90,10,2.1,2.3,2.3,2.5

// this query calculates request duration percentiles and count by name
let start=datetime("2021-04-13T18:35:00.000Z");
let end=datetime("2021-04-13T18:52:00.000Z");
let timeGrain=5m;
let dataset=requests
    // additional filters can be applied here
    | where timestamp > start and timestamp < end
    | where client_Type != "Browser"
;
dataset
// change 'operation_Name' on the below line to segment by a different property
| summarize count_=sum(itemCount), avg(duration), percentiles(duration, 50, 95, 99) by operation_Name
// calculate duration percentiles and count for all requests (overall)
| union(dataset
    | summarize count_=sum(itemCount), avg(duration), percentiles(duration, 50, 95, 99)
    | extend operation_Name="Overall")

Output
Operation_Name, count_, avg_duration, percentiles_duration_50, percentiles_duration_95, percentiles_duration_99
Overall,100,2.1,2.3,2.3,2.5
testreq,100,2.1,2.3,2.3,2.5

// failed request count by name
let start=datetime("2021-04-14T07:50:00.000Z");
let end=datetime("2021-04-15T07:50:00.000Z");
let timeGrain=5m;
let dataset=requests
    // additional filters can be applied here
    | where timestamp > start and timestamp < end
    | where client_Type != "Browser"
;
dataset
// change 'operation_Name' on the below line to segment by a different property
| summarize failedCount=sumif(itemCount, success == false),  totalCount=sum(itemCount) by operation_Name
// calculate failed request count for all requests
| union(dataset
    | summarize failedCount=sumif(itemCount, success == false), totalCount=sum(itemCount)
    | extend operation_Name="Overall")
| where failedCount > 0
| order by failedCount desc

Output
Operation_Name, failedCount, Totalcount
Overall,10,100
testreq,10,100