apache/airflow

Log exceptions as warnings till the final attempt

Open

#32.246 geöffnet am 28. Juni 2023

Auf GitHub ansehen
 (10 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Python (16.781 Forks)batch import
good first issuekind:feature

Repository-Metriken

Stars
 (44.809 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 7T 18h) (834 gemergte PRs in 30 T)

Beschreibung

Description

We have an integration with sentry on Google cloud composer. We would like to be alerted for any exceptions happening in airflow , but don't want to be alerted when those exceptions would be retried. We tried setting alert conditions on number of errors, but it does not solve the problem as we have hundreds of instances of a DAG running.

Requirements:

  1. Log as warning when try_number is less than equal to max_tries.
  2. Log as an error in the final try.

Use case/motivation

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Contributor Guide