Open4
Dataformの実行結果をSlack通知
Cloud Logging, Monitoring Alertを利用
ロギング画面の「操作」>「ログアラートの作成」で簡単にアラートを作成できる
ロギング > ログエクスプローラでDataformのログを検索
「すべてのログ名」→「ログ名の選択」
検索文字列は下記
logName="projects/<project-name>/logs/dataform.googleapis.com%2Fworkflow_invocation_completion"
時間帯を指定し、見たいログを表示する
ワークフローの実行ログ
成功時
{
"insertId": "m9343sd1jyz",
"jsonPayload": {
"workflowInvocationId": "1727992806-33d3f023-8c23-472a-af9f-634eb4c57a0a",
"workflowConfigId": "workflow-config-id",
"@type": "type.googleapis.com/google.cloud.dataform.logging.v1.WorkflowInvocationCompletionLogEntry",
"terminalState": "SUCCEEDED",
"releaseConfigId": "production"
},
"resource": {
"type": "dataform.googleapis.com/Repository",
"labels": {
"resource_container": "123456789098",
"location": "us-central1",
"repository_id": "repository_id"
}
},
"timestamp": "2024-10-03T22:00:53.154761740Z",
"severity": "INFO",
"logName": "projects/<project-id>/logs/dataform.googleapis.com%2Fworkflow_invocation_completion",
"receiveTimestamp": "2024-10-03T22:00:54.142130006Z"
}
失敗時
{
"insertId": "1osiutqd1a06",
"jsonPayload": {
"releaseConfigId": "production",
"workflowConfigId": "workflow-config-id",
"@type": "type.googleapis.com/google.cloud.dataform.logging.v1.WorkflowInvocationCompletionLogEntry",
"workflowInvocationId": "1727942402-fbd6aefe-6c10-4266-a510-de9213980f7b",
"terminalState": "FAILED"
},
"resource": {
"type": "dataform.googleapis.com/Repository",
"labels": {
"repository_id": "repository_id",
"location": "us-central1",
"resource_container": "123456789098"
}
},
"timestamp": "2024-10-03T08:00:15.289779457Z",
"severity": "ERROR",
"logName": "projects/<project-id>/logs/dataform.googleapis.com%2Fworkflow_invocation_completion",
"receiveTimestamp": "2024-10-03T08:00:15.837968968Z"
}
ログにラベルを付ける