Sentry SentryAlert

Sentry SentryAlert

Certified

Send Sentry alert for failed flow

Use in errors tasks to notify Sentry when a flow or task fails. Requires a project DSN (see Sentry DSN guide); default payload includes execution metadata and generates an event ID if omitted. Uses ENVELOPE ingest by default (STORE optional) and enforces Sentry limits of 1 MB payload / 100 MB envelope; payload format: Sentry event payloads.

yaml
type: io.kestra.plugin.sentry.SentryAlert

Send a Sentry alert on a failed flow execution

yaml
id: unreliable_flow
namespace: company.team

tasks:
  - id: fail
    type: io.kestra.plugin.scripts.shell.Commands
    runner: PROCESS
    commands:
      - exit 1

errors:
  - id: alert_on_failure
    type: io.kestra.plugin.sentry.SentryAlert
    dsn: "{{ secret('SENTRY_DSN') }}" # format: https://xxx@xxx.ingest.sentry.io/xxx
    endpointType: STORE   # use STORE if ENVELOPE is not enabled
    options:
      readTimeout: PT20S
      headers:
        X-Flow-Name: "{{ flow.id }}"

Send a custom Sentry alert

yaml
id: sentry_alert
namespace: company.team

tasks:
  - id: send_sentry_message
    type: io.kestra.plugin.sentry.SentryAlert
    dsn: "{{ secret('SENTRY_DSN') }}"
    endpointType: "ENVELOPE"
    payload: |
      {
          "timestamp": "{{ execution.startDate }}",
          "platform": "java",
          "level": "error",
          "transaction": "/execution/id/{{ execution.id }}",
          "server_name": "localhost:8080",
          "message": {
            "message": "Execution {{ execution.id }} failed"
          },
          "extra": {
            "Namespace": "{{ flow.namespace }}",
            "Flow ID": "{{ flow.id }}",
            "Execution ID": "{{ execution.id }}",
            "Link": "http://localhost:8080/ui/executions/{{flow.namespace}}/{{flow.id}}/{{execution.id}}"
          }
      }
Properties
Min length1

Sentry DSN

Project DSN used to authenticate requests; keep in secrets and follow Sentry DSN format.

DefaultENVELOPE
Possible Values
ENVELOPESTORE

Sentry ingest endpoint

Defaults to ENVELOPE; switch to STORE if the envelope endpoint is not supported by your Sentry project.

HTTP client options

Tune Sentry request timeouts, charset, headers, and 10 MB response cap; defaults suit most flows.

Definitions
connectTimeoutstring

Connect timeout

Optional socket connect timeout; if unset, HTTP client default applies.

connectionPoolIdleTimeoutstring
DefaultPT0S

Connection pool idle timeout

Idle lifetime in the connection pool; defaults to 0s (no idle retention).

defaultCharsetstring
DefaultUTF-8

Default request charset

Charset used for requests when none is specified; defaults to UTF-8.

headersobject

HTTP headers

Rendered header map applied to the outbound request.

maxContentLengthintegerstring
Default10485760

Maximum response size

Upper bound for response content length in bytes; defaults to 10 MB.

readIdleTimeoutstring
DefaultPT5M

Read idle timeout

Closes idle read connections after inactivity; defaults to 5 minutes.

readTimeoutstring
DefaultPT10S

Read timeout

Maximum read duration before failing; defaults to 10s.

Sentry event payload

JSON body sent to Sentry; defaults to execution-based template and must stay under Sentry size limits.

Reference (ref) of the pluginDefaults to apply to this task.