我们能否查明对给定页面的请求数量是否有所增加?
Can we find out if there is an increase to number of requests to a given page?
如果我在 Azure 中有一个 Web 应用程序,并配置了 ApplicationInsights,是否有一种方法可以判断对给定页面的请求数量是否有所增加?
我知道我们可以在给定的时间段内获得 性能 的“增量”,与之前的时间段相比,但似乎我们无法为 请求?
例如,我想回答这样的问题:“与上一时期相比,过去一小时内哪些页面的请求增加百分比最高”?
有谁知道怎么做,或者可以通过 AppInsights 查询语言来完成吗?
谢谢!
不确定是否可以使用 Portal 完成,我不这么认为。但我提出了以下 Kusto 查询:
requests
| where timestamp > ago(2h) and timestamp < ago(1h)
| summarize previousPeriod = todouble(count()) by url
| join (
requests
| where timestamp > ago(1h)
| summarize lastHour = todouble(count()) by url
) on url
| project url, previousPeriod, lastHour, change = ((lastHour - previousPeriod) / previousPeriod) * 100
| order by change desc
这大约是每个 url 的流量 increase/decrease,您可以将 count()
更改为例如 avg(duration)
以获得 increase/decrease平均持续时间。
如果我在 Azure 中有一个 Web 应用程序,并配置了 ApplicationInsights,是否有一种方法可以判断对给定页面的请求数量是否有所增加?
我知道我们可以在给定的时间段内获得 性能 的“增量”,与之前的时间段相比,但似乎我们无法为 请求?
例如,我想回答这样的问题:“与上一时期相比,过去一小时内哪些页面的请求增加百分比最高”?
有谁知道怎么做,或者可以通过 AppInsights 查询语言来完成吗?
谢谢!
不确定是否可以使用 Portal 完成,我不这么认为。但我提出了以下 Kusto 查询:
requests
| where timestamp > ago(2h) and timestamp < ago(1h)
| summarize previousPeriod = todouble(count()) by url
| join (
requests
| where timestamp > ago(1h)
| summarize lastHour = todouble(count()) by url
) on url
| project url, previousPeriod, lastHour, change = ((lastHour - previousPeriod) / previousPeriod) * 100
| order by change desc
这大约是每个 url 的流量 increase/decrease,您可以将 count()
更改为例如 avg(duration)
以获得 increase/decrease平均持续时间。