SignalRServiceDiagnosticLogs 表的查询

客户端连接 ID

客户端连接的连接 ID 的摘要。

SignalRServiceDiagnosticLogs
| where ConnectionType == "Client"
| summarize count() by ConnectionId, _ResourceId

连接关闭原因

连接断开的关闭原因摘要。

SignalRServiceDiagnosticLogs
| where OperationName == "ConnectionAborted" or OperationName == "ConnectionEnded" or OperationName == "EndConnectionFailed"
| summarize count() by  ConnectionId, Message, _ResourceId

IP 地址

连接到服务的 IP 摘要,有助于确定同一问题是否在 IP 地址中具有模式。

SignalRServiceDiagnosticLogs
| where isnotnull(CallerIpAddress) and isnotempty(CallerIpAddress)
| summarize count() by CallerIpAddress, _ResourceId

与特定连接 ID 相关的日志

包含特定连接 ID 的日志列表。

SignalRServiceDiagnosticLogs
// Enter ConnectionId value to filter by specific connection ID.
| where ConnectionId == ""
| sort by TimeGenerated asc
| take 100

与特定消息跟踪 ID 相关的日志

包含特定消息跟踪 ID 的日志列表。

SignalRServiceDiagnosticLogs
| where OperationName == "ConnectionAborted" or OperationName == "ConnectionEnded" or OperationName == "EndConnectionFailed"
| summarize count() by  ConnectionId, Message, _ResourceId

与特定用户 ID 相关的日志

包含特定用户 ID 的日志列表。

SignalRServiceDiagnosticLogs
// Enter UserId value to filter by specific user ID.
| where UserId == ""
| sort by TimeGenerated asc
| take 100

包含警告或异常的日志

包含警告或异常的日志列表, (第一) 显示的最新日志。

SignalRServiceDiagnosticLogs
| where Level == "Warning" or Level == "Error"
| sort by TimeGenerated desc, Collection asc
| take 100

服务器连接 ID

服务器连接的连接 ID 的摘要。

SignalRServiceDiagnosticLogs
| where ConnectionType == "Server"
| summarize count() by  ConnectionId, _ResourceId

操作名称的时间图表

时间操作图表,用于获取连接和消息传送事件的趋势。

SignalRServiceDiagnosticLogs
| summarize count() by OperationName, bin(TimeGenerated, 1min)
| render timechart

传输类型

连接的传输类型的摘要。 默认情况下,Websocket 应占多数。

SignalRServiceDiagnosticLogs
| where isnotnull(TransportType) and isnotempty(TransportType)
| summarize count() by TransportType, _ResourceId

用户 ID

用户 ID 的摘要。

SignalRServiceDiagnosticLogs
| summarize count() by UserId, _ResourceId