You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
In Prefect Cloud / Prefect 3.x, tracing an automation back to the originating event can be difficult because system-generated events like prefect-cloud.automation.action.triggered do not include a direct causal reference (follows) to the event that matched the trigger.
Impact
Users who have flows started from automations (e.g., RunDeployment actions) often need to trace failures back to the source event. Today this requires time-window searches and heuristics. A direct link would make debugging and audit workflows much easier.
Proposal
Include a causal link from prefect-cloud.automation.action.triggered to the triggering event. Options:
Set the follows field on prefect-cloud.automation.action.triggered to the id of the triggering event (ideal for causal chains).
Add the triggering event id to the event payload (e.g., payload.triggering_event_id).
Add the triggering event to related with a role like triggering_event.
Ensure the Events UI surfaces this linkage (e.g., a “View triggering event” link) so users can click back to the source.
Context
User report: Their automation is started by a custom event. The deployment fails; when tracing back, they reach prefect-cloud.automation.action.triggered which does not include follows. They’ve never seen a follows key on this event.
This is consistent with current behavior: follows is optional. Many system events don’t set it, making tracing harder.
Benefits
Faster troubleshooting and clearer audit trails
Better UX consistency with event causal ordering
Minimal API surface change if reusing existing follows semantics
Potential considerations
Ensure that follows semantics are preserved only if events occur within the accepted timing window. If that’s too constraining, consider payload.triggering_event_id or a related role instead.
Thanks for considering! Happy to provide more examples or test cases.
This discussion was automatically created by the Marvin bot to preserve valuable community insights.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion was created from a Slack thread conversation.
Original Thread: https://prefect-community.slack.com/archives/C04DZJC94DC/p1762928923126699
Summary
In Prefect Cloud / Prefect 3.x, tracing an automation back to the originating event can be difficult because system-generated events like
prefect-cloud.automation.action.triggereddo not include a direct causal reference (follows) to the event that matched the trigger.Impact
Users who have flows started from automations (e.g.,
RunDeploymentactions) often need to trace failures back to the source event. Today this requires time-window searches and heuristics. A direct link would make debugging and audit workflows much easier.Proposal
prefect-cloud.automation.action.triggeredto the triggering event. Options:followsfield onprefect-cloud.automation.action.triggeredto theidof the triggering event (ideal for causal chains).payload(e.g.,payload.triggering_event_id).relatedwith a role liketriggering_event.Context
prefect-cloud.automation.action.triggeredwhich does not includefollows. They’ve never seen afollowskey on this event.followsis optional. Many system events don’t set it, making tracing harder.Benefits
followssemanticsPotential considerations
followssemantics are preserved only if events occur within the accepted timing window. If that’s too constraining, considerpayload.triggering_event_idor arelatedrole instead.Thanks for considering! Happy to provide more examples or test cases.
This discussion was automatically created by the Marvin bot to preserve valuable community insights.
Beta Was this translation helpful? Give feedback.
All reactions