-
Notifications
You must be signed in to change notification settings - Fork 2
/
failure-alert-sentry.yaml
49 lines (43 loc) · 1.92 KB
/
failure-alert-sentry.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
extend:
title: Send an alert to Sentry when any flow fails in the company namespace
description: >-
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](https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/#where-to-find-your-dsn).
You can customize the alert `payload`, which is a JSON object. For more
information about the payload, check the [Sentry Event Payloads
documentation](https://develop.sentry.dev/sdk/event-payloads/).
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](https://kestra.io/plugins/core#conditions).
tags:
- Notifications
ee: false
demo: false
meta_description: This flow shows how to send an alert to Sentry when a flow
fails. The only required input is a DSN string value.