-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit structured log events to ApplicationInsights (#308)
This adds some structured logging to Application Insights for various events ("thing" Created / Finished for Workflow Run, Job, Job Partition, and Task).
- Loading branch information
Tom Augspurger
authored
Jul 11, 2024
1 parent
419b963
commit a1d85b4
Showing
10 changed files
with
291 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,9 @@ pctasks: | |
keyvault: | ||
enabled: false | ||
|
||
applicationinsights: | ||
enabled: false | ||
|
||
pcdev: | ||
services: | ||
pctasks: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Telemetry | ||
|
||
## Structured Logs | ||
|
||
The pctasks executor generates logs for the following events: | ||
|
||
1. `WorkflowCreated` | ||
2. `WorkflowFinished` | ||
3. `JobCreated` | ||
4. `JobFinished` | ||
5. `JobPartitionCreated` | ||
6. `JobPartitionFinished` | ||
7. `TaskCreated` | ||
8. `TaskFinished` | ||
|
||
In general, a record is emitted when something is created or finished, at the Workflow, Job, JobPartition, and Task levels. | ||
|
||
Depending on the level (Workflow, Job, JobPartition, Task) the logs will contain the following fields: | ||
|
||
| Field | Record Levels | Description | | ||
| ----------- | ----------------------- | --------------------------------------------------------------------- | | ||
| type | All | The event type, from the list above | | ||
| workflowId | All | The ID of the workflow, from the workflow definition | | ||
| datasetId | All | The ID of the dataset, from the workflow definition | | ||
| runId | All | The of the workflow run, generated by pctasks | | ||
| recordLevel | All | The level (Workflow, Job, JobPartition, Task) this record belongs to. | | ||
| jobId | Job, JobPartition, Task | The ID of the job, from the workflow definition | | ||
| partitionId | JobPartition, Task | The ID of the partition, from the workflow definition and pctasks | | ||
| taskId | Task | The ID of the task, from the workflow definition and pctasks | | ||
|
||
Depending on the record, additional fields will be included: | ||
|
||
* `status`: Present for "Finished" events, indicating success or failure of that operation. | ||
* `errors`: Present for `JobFinished` and `TaskFinished` events when | ||
`status="failed"`, containing a list of errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.