Error Tracking¶
Airflow can be set up to send errors to Sentry.
Setup¶
First you must install sentry requirement:
pip install 'apache-airflow[sentry]'
After that, you need to enable the integration by set sentry_on option in [sentry] section to "True".
Add your SENTRY_DSN to your configuration file e.g. airflow.cfg in [sentry] section. Its template resembles the following: '{PROTOCOL}://{PUBLIC_KEY}@{HOST}/{PROJECT_ID}'
[sentry]
sentry_dsn = http://foo@sentry.io/123
Note
If this value is not provided, the SDK will try to read it from the SENTRY_DSN environment variable.
You can supply additional configuration options based on the Python platform via [sentry] section.
Unsupported options: integrations, in_app_include, in_app_exclude, ignore_errors, before_breadcrumb, before_send, transport.
Tags¶
Name |
Description |
|---|---|
|
Dag name of the dag that failed |
|
Task name of the task that failed |
|
Execution date when the task failed |
|
Operator name of the task that failed |
Breadcrumbs¶
When a task fails with an error breadcrumbs will be added for the other tasks in the current dag run.
Name |
Description |
|---|---|
|
Task ID of task that executed before failed task |
|
Final state of task that executed before failed task (only Success and Failed states are captured) |
|
Task operator of task that executed before failed task |
|
Duration in seconds of task that executed before failed task |