Menu

How to monitor Apache Airflow DAGs so you know when they silently fail
πŸ–ΌοΈ

How to monitor Apache Airflow DAGs so you know when they silently fail

DEV CommunityΒ·KrissΒ·7 months ago
#ErD8cBxg
#option#airflow#python#devops#task
Reading 0:00
15s threshold

Your Airflow DAG ran last night. All tasks: green. All durations: normal. Export job completed at 02:14.

Zero rows exported. Nobody knows.

This is the silent failure Airflow's built-in alerting doesn't catch. on_failure_callback fires when a task crashes. It doesn't fire when a task exits 0 after connecting to a stale database replica and processing nothing. That's the failure mode that eats your Monday morning.

This article shows you two ways to add external monitoring to Airflow DAGs β€” so you get paged for both kinds of failures.

Why Airflow's built-in alerts aren't enough

Airflow gives you several callback hooks:

on_failure_callback β€” task or DAG run failed

on_success_callback β€” task or DAG run succeeded

on_retry_callback β€” task queued for retry

on_execute_callback β€” task about to start

on_skipped_callback β€” task raised AirflowSkipException

These are useful.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.