Remote logging to Azure blob storage #749
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
@HakarK I think something must have changed in the Azure provider. Before we try using an Because right now, it looks like Airflow is not even trying to use a remote provider (probably because of the missing If that fixes it, we should make an update to both the chart's docs and the upstream airflow provider docs: |
Beta Was this translation helpful? Give feedback.
-
@HakarK after reading the airflow implementation, I can confirm that Azure Blob Store logging is really messed up, as explained here. Effectively, the problems are:
However, we can work around these issues to get logs stored in the Azure Blob Store container named SOLUTION: Airflow 2.6If you are using airflow 2.6, you can set:
SOLUTION: Airflow 2.0 - 2.5If you are using airflow 2.0 - 2.5, you can set:
Then, you must create the following airflow:
localSettings:
stringOverride: |
from copy import deepcopy
from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG
LOGGING_CONFIG = deepcopy(DEFAULT_LOGGING_CONFIG)
LOGGING_CONFIG["handlers"]["task"]["wasb_container"] = "MY_CONTAINER"
LOGGING_CONFIG["handlers"]["task"]["wasb_log_folder"] = "CUSTOM_PREFIX"
|
Beta Was this translation helpful? Give feedback.
-
@thesuperzapper Is there documentation for reading DAGs from storage account? |
Beta Was this translation helpful? Give feedback.
@HakarK after reading the airflow implementation, I can confirm that Azure Blob Store logging is really messed up, as explained here.
Effectively, the problems are:
airflow-logs
REMOTE_BASE_LOG_FOLDER
must start withwasb
for airflow to know you are using Azure Blob Store (which causes blob names to always have a prefix that starts withwasb/
)However, we can work around these issues to get logs stored in the Azure Blob Store container named
MY_CONTAINER
, with the prefixCUSTOM_PREFIX/
.SOLUTION: Airflow 2.6
If you are using airflow 2.6, you can set:
AIRFLOW__LOGGING__REMOTE_LOGGING
toTrue
AIRFLOW__LOGGING__REMOTE_LOG_CONN_ID