ABSBotRequests 數據表的查詢
如需在 Azure 入口網站 中使用這些查詢的詳細資訊,請參閱Log Analytics教學課程。 如需 REST API,請參閱 查詢。
用戶端到 Direct Line 通道
用戶端到 Direct Line 通道要求的記錄。
// All the API calls that clients make to Direct Line channel
// e.g. Generate a Token, Refresh a Token, Post an Activity, Get Activities, GetAttachments, etc.
// You can adjust the limit value to the number of logs you would like to retrieve.
ABSBotRequests
| where OperationName contains "ClientToDirectLine"
| sort by TimeGenerated desc
| limit 100
Bot 到通道
從 Bot 到通道的要求記錄。
// This shows logs of requests sent by the bot to Azure Bot Service channels.
// You can adjust the limit value to the number of logs you would like to retrieve.
ABSBotRequests
| where OperationName contains "BotToChannel"
| sort by TimeGenerated desc
| limit 100
Bot 的通道
從通道到 Bot 的要求記錄。
// This query retrieves logs of requests sent from Azure Bot Service channels to the bot.
// You can adjust the limit value to the number of logs you would like to retrieve.
ABSBotRequests
| where OperationName contains "ChannelToBot"
| sort by TimeGenerated desc
| limit 100
從Facebook到 Azure Bot 服務的要求
從Facebook到 Azure Bot Service Facebook 通道的要求記錄。
// To retrieve logs for another channel, replace FacebookToChannel with the respective channel request operation name
// e.g. SlackToChannel, KikToChannel, GroupmeToChannel, LineToChannel, SMSToChannel, TelegramToChannel and EmailToChannel.
ABSBotRequests
| where OperationName contains "FacebookToChannel"
| sort by TimeGenerated desc
從 Azure Bot Service 到 Facebook API 的要求
從 Azure Bot Service Facebook 通道到 Facebook API 的要求記錄。
// To retrieve logs for another channel, replace ChannelToFacebookAPI with the respective channel request operation name
// e.g. ChannelToSlackAPI, ChannelToGroupmeAPI, ChannelToKikAPI, ChannelToLineAPI, ChannelToSMSAPI, ChannelToTelegramAPI and ChannelToEmailAPI.
ABSBotRequests
| where OperationName contains "ChannelToFacebookAPI"
| sort by TimeGenerated desc
從客戶端傳送至 Direct Line 的活動
將活動從用戶端傳送至 Direct Line 通道的要求記錄。
// This query displays logs of requests sent from a client such as WebChat to Direct Line channel.
// Replace 'SendAnActivity:ClientToDirectLine' with any operation name whose logs you would like to retrieve.
ABSBotRequests
| where OperationName == 'SendAnActivity:ClientToDirectLine'
| sort by TimeGenerated desc
直接線路通道記錄
擷取與 Direct Line 通道相關聯的記錄。
// This query retrieves logs of requests related to Direct Line channel.
ABSBotRequests
| where Channel == "directline"
| sort by TimeGenerated desc
失敗的要求
要求失敗的記錄清單。
// Retrieve all logs of requests that have not been successful within a selected time range.
ABSBotRequests
| where ResultCode < 200 or ResultCode >= 300
| sort by TimeGenerated desc
直接折線通道回應碼折線圖
顯示 Direct Line 通道要求回應碼的折線圖。
// This query displays a Line Chart showing requests related to Direct Line channel.
ABSBotRequests
| where Channel == "directline"
| summarize Number_Of_Requests = count() by tostring(ResultCode), bin(TimeGenerated, 5m)
| render timechart
要求工期折線圖
折線圖顯示每個作業的要求回應時間/持續時間。
// This query displays a Line Chart showing requests response duration per operation.
ABSBotRequests
| summarize DurationMs = avg(DurationMs) by bin(TimeGenerated, 5m), OperationName
| render timechart
回應碼折線圖
顯示要求回應狀態代碼的折線圖。
// Display a Line Chart of requests response status codes.
ABSBotRequests
| summarize Number_Of_Requests = count() by tostring(ResultCode), bin(TimeGenerated, 5m)
| render timechart
回應碼 PieChart
顯示要求回應狀態代碼的餅圖。
// Display a Pie Chart showing requests response status codes.
ABSBotRequests
| summarize count() by tostring(ResultCode)
| render piechart
要求作業 PieChart
顯示要求作業的餅圖。
// Display a Pie Chart showing requests by operation name.
// This gives a perspective of the request operations percentage distribution in the selected time range.
ABSBotRequests
| summarize count() by tostring(OperationName)
| render piechart