New to Kestra?
Use blueprints to kickstart your first workflows.
Send a Sentry alert whenever a Kestra workflow execution fails or warns, using one centralized system flow with the SentryExecution task. No per-flow config.
id: failure-alert-sentry-1
namespace: system
tasks:
- id: send_alert
type: io.kestra.plugin.sentry.SentryExecution
executionId: "{{ trigger.executionId }}"
transaction: /execution/id/{{ trigger.executionId }}
dsn: "{{ secret('SENTRY_DSN') }}"
level: ERROR
triggers:
- id: on_failure
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatus
in:
- FAILED
- WARNING
Catch failed workflow executions in Sentry without bolting alerting onto every flow you run. This system flow listens for any execution that ends in FAILED or WARNING across your Kestra instance and pushes a structured event to Sentry, so on-call engineers see pipeline failures in the same issue tracker they already use for application errors. Centralized failure alerting means one place to maintain, one DSN to rotate, and consistent severity across every namespace.
io.kestra.plugin.core.trigger.Flow trigger watches the whole instance for completed executions.io.kestra.plugin.core.condition.ExecutionStatus condition filters those events down to executions whose status is FAILED or WARNING.send_alert task (io.kestra.plugin.sentry.SentryExecution) sends the event to Sentry, tagging it with the failing executionId, a transaction deep link back to the execution (/execution/id/{{ trigger.executionId }}), and a level of ERROR.dsn pulled from {{ secret('SENTRY_DSN') }}, so no credential is ever hardcoded.level property.Sentry has no view into your orchestration layer on its own, it only knows about events you send it. Kestra closes that gap: the event-driven Flow trigger reacts to execution outcomes the instant they happen, the declarative YAML keeps the alerting policy in version control, and the ExecutionStatus condition lets you scope exactly which outcomes page someone. You get retries, full execution lineage, and a single source of truth for failure handling that no standalone scheduler or per-script try/except can match.
SENTRY_DSN: the Sentry Data Source Name (DSN) used to authenticate and route events to your Sentry project. Find it under Sentry project settings, "Client Keys (DSN)".SENTRY_DSN.ExecutionNamespaceCondition to the trigger.level (DEBUG, INFO, WARNING, ERROR, FATAL) to match your severity policy.payload to add tags, fingerprints, or contextual metadata.send_alert for multi-channel paging.