Thomas DeBroux
11/18/2024, 4:10 PM{
"type": "event",
"match": {
"prefect.resource.id": "prefect.flow-run.*"
},
"match_related": {},
"after": [],
"expect": [
"prefect.flow-run.TimedOut",
"prefect.flow-run.Failed",
"prefect.flow-run.AwaitingRetry",
"prefect.flow-run.Retrying",
"prefect.flow-run.Crashed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Reactive",
"threshold": 1,
"within": 0
}
Marvin
11/18/2024, 4:11 PMThomas DeBroux
11/18/2024, 4:14 PMMarvin
11/18/2024, 4:15 PMMarvin
11/18/2024, 4:16 PMflow ID
against a list of excluded IDs before performing any subsequent actions.
For detailed information on setting up and customizing triggers, you might want to refer to the Prefect 3.x Custom Triggers Documentation.
Think of it as adding a sneaky little bouncer at the club entrance (post-event handling) who checks the guest list, rather than at the ticket booth (event trigger configuration).Thomas DeBroux
11/18/2024, 4:40 PMMarvin
11/18/2024, 4:42 PMprefect.flow-run.tags
.
2. Specify State Expectations: Indicate the particular states that should trigger the notification.
Here's an example JSON structure for your trigger:
json
{
"type": "event",
"match": {
"prefect.resource.id": "prefect.flow-run.*",
"prefect.flow-run.tags": ["your-specific-tag"]
},
"match_related": {},
"after": [],
"expect": [
"prefect.flow-run.TimedOut",
"prefect.flow-run.Failed",
"prefect.flow-run.AwaitingRetry",
"prefect.flow-run.Retrying",
"prefect.flow-run.Crashed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Reactive",
"threshold": 1,
"within": 0
}
Replace "your-specific-tag"
with the tag you're interested in. This setup filters events for flow runs with that specific tag and notifies you when they reach any of the specified states.
For more details, please check the Prefect 3.x Custom Triggers Documentation.
Think of it as ordering a pizza with your favorite toppings only—ensuring you get just what you crave whenever it’s available!