Skip to main content

Show Remote Execution Agent task logs in Airflow UI

You can make task logs visible directly in the Airflow UI by exporting task logs to your object storage, and configuring the Astro API Server to securely retrieve them.

This requires:

  • Configuration in the Remote Execution Agent's values.yaml.
  • Deployment configuration in the Astro UI.
  • Proper workload identities for the Remote Execution Agent, write access, and the Astro API Server, read access.
  1. Configure the following environment variables in the Helm chart's values.yaml:
commonEnv:
- name: AIRFLOW__LOGGING__REMOTE_LOGGING
value: "True"
- name: AIRFLOW__LOGGING__REMOTE_LOG_CONN_ID
value: "astro_aws_logging"
- name: AIRFLOW_CONN_ASTRO_AWS_LOGGING
value: "s3://"
- name: AIRFLOW__LOGGING__REMOTE_BASE_LOG_FOLDER
value: "s3://<bucket>/<deployment-id>"
- name: AIRFLOW__LOGGING__LOGGING_CONFIG_CLASS
value: "astronomer.runtime.logging.logging_config"
- name: ASTRONOMER_ENVIRONMENT
value: "cloud"
info

The path for the AIRFLOW__LOGGING__REMOTE_BASE_LOG_FOLDER value is configurable. This is only an example format.

  1. Run helm upgrade to apply the change to your Agents.

  2. In the Astro UI, navigate to your Deployment and click the Details tab. Click Edit in the Advanced section to access your logging configurations.

  3. Select Bucket Storage in the Task Logs field and fill in the Bucket URL as s3://<bucket>/<deployment-id>. Or, use the path that you configured for AIRFLOW__LOGGING__REMOTE_BASE_LOG_FOLDER in your Remote Agent's Helm chart's values.yaml.

  4. In the Workload Identity for Bucket Storage section, select Customer Managed Identity and follow the instructions to set up your Customer Managed Identity so that the identity you create has read access to the specified bucket and path.

Was this page helpful?