
Sentry SentryAlert
CertifiedSend Sentry alert for failed flow
Sentry SentryAlert
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.
type: io.kestra.plugin.sentry.SentryAlertExamples
Send a Sentry alert on a failed flow execution
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://{PUBLIC_KEY}@{HOST}/{PROJECT_ID}
endpointType: STORE # use STORE if ENVELOPE is not enabled
options:
readTimeout: PT20S
headers:
X-Flow-Name: "{{ flow.id }}"Send a custom Sentry alert
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
dsn *string
1Sentry DSN
Project DSN used to authenticate requests, in the Sentry DSN format
{PROTOCOL}://{PUBLIC_KEY}[: {SECRET_KEY}]@{HOST}{PATH}/{PROJECT_ID}, from sentry.io or a self-hosted Sentry;
the ingest URL is derived from it and the secret key is never sent.
A value without a public key is used as the ingest URL as is. Keep it in secrets.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150endpointType string
ENVELOPEENVELOPESTORESentry ingest endpoint
Defaults to ENVELOPE; switch to STORE if the envelope endpoint is not supported by your Sentry project.
options
HTTP client options
Tune Sentry request timeouts, charset, headers, and 10 MB response cap; defaults suit most flows.
io.kestra.plugin.sentry.AbstractSentryConnection-RequestOptions
Connect timeout
Optional socket connect timeout; if unset, HTTP client default applies.
PT0SConnection pool idle timeout
Idle lifetime in the connection pool; defaults to 0s (no idle retention).
UTF-8Default request charset
Charset used for requests when none is specified; defaults to UTF-8.
java.nio.charset.Charset
HTTP headers
Rendered header map applied to the outbound request.
10485760Maximum response size
Upper bound for response content length in bytes; defaults to 10 MB.
PT5MRead idle timeout
Closes idle read connections after inactivity; defaults to 5 minutes.
PT10SRead timeout
Maximum read duration before failing; defaults to 10s.
payload string
Sentry event payload
JSON body sent to Sentry; defaults to execution-based template and must stay under Sentry size limits.