共用方式為


DurableTaskSchedulerLogs 資料表的查詢

若要了解如何在 Azure 入口網站中使用這些查詢,請參閱 Log Analytics 教程。 如需 REST API,請參閱 查詢

近期錯誤

顯示最新的錯誤與關鍵日誌訊息。

// Recent Errors
// Shows recent error messages
DurableTaskSchedulerLogs
| where Level < 3  // Error and Critical
| project TimeGenerated, TaskHub, OperationName, Log
| sort by TimeGenerated desc
| take 100

勞工連結摘要

TaskHub 隨時間簡單檢視員工連結與斷線的狀況。

// Worker Connection Summary
// Simple view of worker connections by taskhub
DurableTaskSchedulerLogs
| where OperationName == "WorkerConnected" or OperationName == "WorkerDisconnected"
| summarize 
    Connected = countif(OperationName == "WorkerConnected"),
    Disconnected = countif(OperationName == "WorkerDisconnected")
    by TaskHub, bin(TimeGenerated, 1h)
| sort by TimeGenerated desc