Source
id: failure-alert-sentry
namespace: system
tasks:
- id: send_alert
type: io.kestra.plugin.notifications.sentry.SentryExecution
executionId: "{{ trigger.executionId }}"
transaction: /execution/id/{{ trigger.executionId }}
dsn: "{{ secret('SENTRY_DSN') }}"
level: ERROR
triggers:
- id: failed_prod_workflows
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatusCondition
in:
- FAILED
- WARNING
- type: io.kestra.plugin.core.condition.ExecutionNamespaceCondition
namespace: company
prefix: true
About this blueprint
Notifications
This flow shows how to send an alert to Sentry when a flow fails. The only required input is a DSN string value, which you can find when you go to your Sentry project settings and go to the section "Client Keys (DSN)". For more detailed description of how to find your DSN, visit the following Sentry documentation.
You can customize the alert payload
, which is a JSON object. For more information about the payload, check the Sentry Event Payloads documentation.
The level
parameter is the severity of the issue. The task documentation lists all available options including DEBUG
, INFO
, WARNING
, ERROR
, FATAL
. The default value is ERROR
.
This monitoring flow is triggered anytime a flow fails in the prod
namespace. You can fully customize the trigger conditions.
More Related Blueprints