Airflow can be set up to send errors to Sentry.
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
SENTRY_DSN to your configuration file e.g.
[sentry] section. Its template resembles the following:
[sentry] sentry_dsn = http://firstname.lastname@example.org/123
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
Impact of Sentry on Environment variables passed to Subprocess Hook¶
When Sentry is enabled, by default it changes standard library to pass all environment variables to
subprocesses opened by Airflow. This changes the default behaviour of
airflow.hooks.subprocess.SubprocessHook - always all environment variables are passed to the
subprocess executed with specific set of environment variables. In this case not only the specified
environment variables are passed but also all existing environment variables are passed with
SUBPROCESS_ prefix added. This happens also for all other subprocesses.
This behaviour can be disabled by setting
default_integrations sentry configuration parameter to
False which disables
StdlibIntegration. This however also disables other default integrations
and you need to enable them manually if you want to get them enabled,
see Sentry Default Integrations
[sentry] default_integrations = False