Log monitoring
Taskurai is integrated with Azure Monitor Log Analytics to monitor and analyze the worker logs.
There are two types of logs for Taskurai workers:
- Console logs: These are emitted by the worker.
- System logs: These are emitted by the container service.
Prerequisites
- You have set up an application in the Application Setup.
Using the Taskurai Portal
The primary way to access logs is through the Taskurai Portal. Tasks and steps each maintain their own history, where every run records its associated logs.
Advanced: using the SDK
It is possible to query the log messages using the TaskuraiLogsClient.
Console Logs
The Taskurai service provides console log messages at the worker level.
The console log data is accessible by querying the TaskuraiConsoleLogs table. Common columns in the table are:
| Column | Type | Description |
|---|---|---|
| Message | String | Message |
| Level | String | Level |
| Type | String | Type |
| Timestamp | Real | Timestamp |
| TimeGenerated | DateTimeOffset | Time generated (UTC) |
| Time | DateTimeOffset | Time (UTC) |
| TaskId | String | Task ID |
| TaskRunCount | Long | Task run count |
| StepId | String | Step ID |
| StepRunCount | Long | Step run count |
| TaskCorrelationId | String | Task correlation ID |
| Command | String | Command name |
| HubName | String | Hub name |
| WorkerName | String | Worker name |
| WorkerRevision | String | Worker revision |
| ContainerImage | String | Container Image |
| SourceContext | String | Source context |
| PlainMessage | String | Plain message |
| CustomColumns | Dynamic | User defined columns (structured logging) |
Using custom columns
When custom columns are introduced in structured logging, these columns can be used in your Kusto queries:
TaskuraiConsoleLogs | extend TaskuraiSDKVersion = CustomColumns[\"TaskuraiSDKVersion_s\"] | where TaskuraiSDKVersion == '1.10.0.0'
System Logs
The Taskurai service provides system log messages at the worker level.
The system log data is accessible by querying the TaskuraiSystemLogs table. Common columns in the table are:
| Column | Type | Description |
|---|---|---|
| Message | String | Message |
| Timestamp | Real | Timestamp |
| TimeGenerated | DateTimeOffset | Time generated (UTC) |
| Time | DateTimeOffset | Time (UTC) |
| Count | Long | Count |
| Type | String | Message type |
| Level | String | Log level |
| Reason | String | Reason |
| ContainerAppName | String | Container app name |
| WorkerRevision | String | Worker revision |
| WorkerInstance | String | Worker instance |