Skip to content
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 Callbacks Section to Logging & Monitoring #18842

Merged
merged 2 commits into from
Oct 11, 2021
Merged

Conversation

john-jac
Copy link
Contributor

@john-jac john-jac commented Oct 8, 2021

Airflow users often ask for an easy way to monitor the success or failure of tasks and/or DAGs. The use of callbacks, such as on_success_callback, helps users monitor DAG runs in an easily configurable way.

This document provides an overview of available callbacks, linked to the relevant section in the Tasks document. It also provides a simple example of calling a function on any task failure in the DAG, as well as a separate function that is called upon the success of the last task in the DAG.

Airflow users often ask for an easy way to monitor the success or failure of tasks and/or DAGs.  The use of callbacks, such as on_success_callback, helps users monitor DAG runs in an easily configurable way.
Added following note: Callback functions are only invoked when the task state changes due to execution by a worker. As such, task changes set by the command line interface (CLI) or user interface (UI) do not execute callback functions.
@github-actions
Copy link

github-actions bot commented Oct 9, 2021

The PR is likely ready to be merged. No tests are needed as no important environment files, nor python files were modified by it. However, committers might decide that full test matrix is needed and add the 'full tests needed' label. Then you should rebase it to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Oct 9, 2021
@kaxil kaxil merged commit eae7b2e into apache:main Oct 11, 2021
@eladkal eladkal added this to the Airflow 2.2.1 milestone Oct 11, 2021
jedcunningham pushed a commit that referenced this pull request Oct 14, 2021
Airflow users often ask for an easy way to monitor the success or failure of tasks and/or DAGs. The use of callbacks, such as on_success_callback, helps users monitor DAG runs in an easily configurable way.

This document provides an overview of available callbacks, linked to the relevant section in the Tasks document. It also provides a simple example of calling a function on any task failure in the DAG, as well as a separate function that is called upon the success of the last task in the DAG.

(cherry picked from commit eae7b2e)
@jedcunningham jedcunningham added the type:doc-only Changelog: Doc Only label Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:documentation okay to merge It's ok to merge this PR as it does not require more tests type:doc-only Changelog: Doc Only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants