Skip to content

Commit 3bc6856

Browse files
committed
Airflow task logs subpipeline
1 parent 764c1b1 commit 3bc6856

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

airflow/assets/logs/airflow.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,29 @@ pipeline:
8282
enabled: true
8383
sources:
8484
- message
85+
- type: pipeline
86+
name: Task logs pipeline
87+
enabled: true
88+
filter:
89+
query: "dirname:*dag_id*"
90+
processors:
91+
- type: attribute-remapper
92+
name: Map tag `dirname` to an attribute
93+
enabled: true
94+
sources:
95+
- dirname
96+
sourceType: tag
97+
target: dirname
98+
targetType: attribute
99+
preserveSource: false
100+
overrideOnConflict: false
101+
- type: grok-parser
102+
name: Task Attributes Parser
103+
enabled: true
104+
source: dirname
105+
samples:
106+
- 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
107+
grok:
108+
supportRules: ""
109+
matchRules: default
110+
(.*dag_id_%{word:airflow.dagRun.dag_id}/run_id_%{data:airflow.dagRun.run_id}/task_id_%{word:airflow.task.task_id}/attempt_%{word:airflow.task.attempt_id}.log)

0 commit comments

Comments
 (0)