-
Notifications
You must be signed in to change notification settings - Fork 16.8k
KubernetesPodOperator: Support log level parsing from pod container output #64820
Copy link
Copy link
Open
Labels
area:loggingarea:providerskind:featureFeature RequestsFeature Requestsneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yetprovider:cncf-kubernetesKubernetes (k8s) provider related issuesKubernetes (k8s) provider related issues
Description
Description
KubernetesPodOperator (KPO) reads stdout/stderr from pod containers and writes them to Airflow task logs. During ttitlhis process, all log lines are hardcoded to INFO level, making it impossible to distinguish between DEBUG, WARNING, and ERROR messages in the Airflow UI — regardless of what level the pod application originally emitted.
https://github.com/apache/airflow/blob/main/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py#L432-L450
Use case/motivation
- A pod application logs ERROR: database connection failed, but the Airflow UI displays it as INFO. Users scrolling through thousands of log lines have no way to quickly spot the actual error.
- A team configures Airflow's logging_level to suppress DEBUG output in production, but pod DEBUG logs still appear because KPO has already recorded them all as INFO.
- An alerting pipeline watches Airflow task logs for ERROR-level entries to trigger PagerDuty notifications, but it never fires — because pod errors are indistinguishable from normal INFO output.
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:loggingarea:providerskind:featureFeature RequestsFeature Requestsneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yetprovider:cncf-kubernetesKubernetes (k8s) provider related issuesKubernetes (k8s) provider related issues
Type
Fields
Give feedbackNo fields configured for issues without a type.