gpt4 book ai didi

Azure 诊断按所用时间显示 api 调用

转载 作者:行者123 更新时间:2023-12-03 06:57:35 26 4
gpt4 key购买 nike

如何从 azure 诊断获取 top x uniqe api 调用?目前我使用下一个片段:

AzureDiagnostics
| where ResourceType == "APPLICATIONGATEWAYS" and OperationName == "ApplicationGatewayAccess" and requestUri_s startswith "/api"
| top 20 by timeTaken_d
| project timeTaken_d, requestUri_s

输出:

<表类=“s-表”><标题>URI时间 <正文>/api/path_140,352/api/path_138,792/api/path_235,792

如何通过 Uri 聚合数据?

最佳答案

选项 1

top-nested运算符

AzureDiagnostics
| where ResourceType == "APPLICATIONGATEWAYS" and OperationName == "ApplicationGatewayAccess" and requestUri_s startswith "/api"
| top-nested 20 of requestUri_s by sum(timeTaken_d)
选项 2

summarize & top运算符

AzureDiagnostics
| where ResourceType == "APPLICATIONGATEWAYS" and OperationName == "ApplicationGatewayAccess" and requestUri_s startswith "/api"
| summarize sum(timeTaken_d) by requestUri_s
| top 20 by sum_timeTaken_d

关于Azure 诊断按所用时间显示 api 调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72773253/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com