Skip to content

Commit fc76f85

Browse files
committed
add sample for task logs pipeline
1 parent 3bc6856 commit fc76f85

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

airflow/assets/logs/airflow_tests.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,27 @@ tests:
214214
tags:
215215
- "source:LOGS_SOURCE"
216216
timestamp: 1577381689039
217+
-
218+
sample: "[2025-02-18 14:46:00,123] {{python_operator.py:105}} INFO - Task started"
219+
tags:
220+
- "dirname:path/to/airflow/logs/dag_id_airflow_dag_0/run_id_scheduled__2025-02-18T14_46_00+00_00/task_id_print_task_0/attempt_1.log"
221+
result:
222+
custom:
223+
airflow:
224+
dagRun:
225+
dag_id: "airflow_dag_0"
226+
run_id: "scheduled__2025-02-18T14_46_00+00_00"
227+
task:
228+
task_id: "print_task_0"
229+
attempt_id: "1"
230+
filename: "python_operator.py"
231+
level: "INFO"
232+
lineno: 105
233+
timestamp: 1739889960123
234+
message: "Task started"
235+
status: "info"
236+
tags:
237+
- "source:LOGS_SOURCE"
238+
timestamp: 1739889960123
239+
dirname: "path/to/airflow/logs/dag_id_airflow_dag_0/run_id_scheduled__2025-02-18T14_46_00+00_00/task_id_print_task_0/attempt_1.log"
217240

0 commit comments

Comments
 (0)