Skip to content

Commit e5526b1

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

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

airflow/assets/logs/airflow_tests.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,28 @@ tests:
214214
tags:
215215
- "source:LOGS_SOURCE"
216216
timestamp: 1577381689039
217+
-
218+
sample: |
219+
[2025-02-18 14:46:00,123] {{python_operator.py:105}} INFO - Task started
220+
tags:
221+
- 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"
222+
result:
223+
custom:
224+
airflow:
225+
dagRun:
226+
dag_id: "airflow_dag_0"
227+
run_id: "scheduled__2025-02-18T14_46_00+00_00"
228+
task:
229+
task_id: "print_task_0"
230+
attempt_id: "1"
231+
filename: "python_operator.py"
232+
level: "INFO"
233+
lineno: 105
234+
timestamp: 1739889960123
235+
message: "Task started"
236+
status: "info"
237+
tags:
238+
- "source:LOGS_SOURCE"
239+
timestamp: 1739889960123
240+
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"
217241

0 commit comments

Comments
 (0)