-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add write feature to ESTaskHandler #44973
Merged
eladkal
merged 6 commits into
apache:main
from
Owen-CH-Leung:Add-write-log-feature-to-ElasticSearchTaskHandler
Jan 13, 2025
Merged
Add write feature to ESTaskHandler #44973
eladkal
merged 6 commits into
apache:main
from
Owen-CH-Leung:Add-write-log-feature-to-ElasticSearchTaskHandler
Jan 13, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eladkal
reviewed
Dec 17, 2024
Add write feature to ESTaskHandler
eladkal
force-pushed
the
Add-write-log-feature-to-ElasticSearchTaskHandler
branch
from
January 13, 2025 15:32
07b074f
to
638992e
Compare
eladkal
approved these changes
Jan 13, 2025
agupta01
pushed a commit
to agupta01/airflow
that referenced
this pull request
Jan 13, 2025
* Add write feature to ESTaskHandler
karenbraganz
pushed a commit
to karenbraganz/airflow
that referenced
this pull request
Jan 13, 2025
* Add write feature to ESTaskHandler
HariGS-DB
pushed a commit
to HariGS-DB/airflow
that referenced
this pull request
Jan 16, 2025
* Add write feature to ESTaskHandler
dauinh
pushed a commit
to dauinh/airflow
that referenced
this pull request
Jan 24, 2025
* Add write feature to ESTaskHandler
got686-yandex
pushed a commit
to got686-yandex/airflow
that referenced
this pull request
Jan 30, 2025
* Add write feature to ESTaskHandler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For remote logging with Elasticsearch, currently only reading log is supported. Users need to deploy other softwares (such as filebeat & logstash) to ship Airflow task logs to Elasticsearch. 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.
This PR will enable the ElasticSearchTaskHandler to automatically write each task log to Elasticsearch after each DAG task is completed. 2 more config are introduced (namely:
write_to_es
andtarget_index
, which are set to False andairflow-logs
by default`)The ElasticSearchTaskHandler will now also consider the config
delete_local_logs
inlogging
session. When bothwrite_to_es
anddelete_local_logs
are set to True, the handler will delete local task logs upon successfully writing logs to ES.related: #42780