Description
According to the aws provider doc, when enabling remote logging, the CloudwatchTaskHandler and S3TaskHandler supports both reading & writing task logs
https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/logging/index.html
As for remote logging with Elasticsearch / Opensearch, currently only reading log is supported. Users need to deploy other softwares (such as filebeat & logstash) to ship Airflow task logs to Elasticsearch / Opensearch. Also, user would need to ensure the log messages contain a valid log_id of format {dag_id}-{task_id}-{execution_date}-{try_number} in order for reading remote log to work.
Wouldn't be nice if Airflow supports writing each task log to Elasticsearch / Opensearch, after each DAG task is completed ? Similar to S3TaskHandler, once remote logging is properly configured, DAG task log will automatically be written to, and read from Elasticsearch / Opensearch, and users need not deploy additional software to ship task logs
Use case/motivation
Similar to S3TaskHandler, ElasticsearchTaskHandler and OpensearchTaskHandler should support automatically writing task logs to destination.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Description
According to the aws provider doc, when enabling remote logging, the
CloudwatchTaskHandlerandS3TaskHandlersupports both reading & writing task logshttps://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/logging/index.html
As for remote logging with Elasticsearch / Opensearch, currently only reading log is supported. Users need to deploy other softwares (such as filebeat & logstash) to ship Airflow task logs to Elasticsearch / Opensearch. Also, user would need to ensure the log messages contain a valid
log_idof format{dag_id}-{task_id}-{execution_date}-{try_number}in order for reading remote log to work.Wouldn't be nice if Airflow supports writing each task log to Elasticsearch / Opensearch, after each DAG task is completed ? Similar to
S3TaskHandler, once remote logging is properly configured, DAG task log will automatically be written to, and read from Elasticsearch / Opensearch, and users need not deploy additional software to ship task logsUse case/motivation
Similar to
S3TaskHandler,ElasticsearchTaskHandlerandOpensearchTaskHandlershould support automatically writing task logs to destination.Related issues
No response
Are you willing to submit a PR?
Code of Conduct