Kueri untuk tabel AppRequests
Untuk informasi tentang menggunakan kueri ini di portal Azure, lihat tutorial Analitik Log. Untuk REST API, lihat Kueri.
Tren waktu respons
Durasi permintaan diagram selama 12 jam terakhir.
// To create an alert for this query, click '+ New alert rule'
AppRequests
| where TimeGenerated > ago(12h)
| summarize avgRequestDuration=avg(DurationMs) by bin(TimeGenerated, 10m), _ResourceId // use a time grain of 10 minutes
| render timechart
Tren jumlah permintaan
Jumlah Permintaan Bagan selama hari terakhir.
// To create an alert for this query, click '+ New alert rule'
AppRequests
| summarize totalCount=sum(ItemCount) by bin(TimeGenerated, 30m), _ResourceId
| render timechart
Wadah waktu respons
Tampilkan berapa banyak permintaan di setiap keranjang kinerja.
AppRequests
| summarize requestCount=sum(ItemCount), avgDuration=avg(DurationMs) by PerformanceBucket
| order by avgDuration asc // sort by average request duration
| project-away avgDuration // no need to display avgDuration, we used it only for sorting results
| render barchart
Performa operasi
Hitung jumlah permintaan dan durasi berdasarkan operasi.
// To create an alert for this query, click '+ New alert rule'
AppRequests
| summarize RequestsCount=sum(ItemCount), AverageDuration=avg(DurationMs), percentiles(DurationMs, 50, 95, 99) by OperationName, _ResourceId // you can replace 'OperationName' with another value to segment by a different property
| order by RequestsCount desc // order from highest to lower (descending)
10 negara teratas berdasarkan lalu lintas
Bagan jumlah permintaan dari 10 negara teratas.
AppRequests
| summarize CountByCountry=count() by ClientCountryOrRegion
| top 10 by CountByCountry
| render piechart
Permintaan yang gagal – 10 besar
Apa yang dimaksud dengan 3 halaman paling lambat, dan seberapa lambat?
AppRequests
| where Success == false
| summarize failedCount=sum(ItemCount) by Name
| top 10 by failedCount desc
| render barchart
Operasi gagal
Hitung berapa kali operasi gagal, dan berapa banyak pengguna yang terpengaruh.
// To create an alert for this query, click '+ New alert rule'
AppRequests
| where Success == false
| summarize failedCount=sum(ItemCount), impactedUsers=dcount(UserId) by OperationName, _ResourceId
| order by failedCount desc
Pengecualian yang menyebabkan kegagalan permintaan
Temukan pengecualian mana yang menyebabkan permintaan gagal dalam satu jam terakhir.
AppRequests
| where TimeGenerated > ago(1h) and Success == false
| join kind= inner (
AppExceptions
| where TimeGenerated > ago(1h)
) on OperationId
| project exceptionType = Type, failedMethod = Method, requestName = Name, requestDuration = DurationMs, _ResourceId