Blueprints

Send an alert to Sentry when any flow fails in the company namespace

Source

yaml
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.

Sentry Execution

Flow

Execution Status Condition

Execution Namespace Condition

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra