Skip to main content
Flow run events track the lifecycle of every flow run, from scheduling through completion. They are emitted on every state transition and, optionally, as periodic heartbeats during execution.

prefect.flow-run.{state}

Emitted each time a flow run transitions to a new state. The {state} suffix is the state name (for example, prefect.flow-run.Running or prefect.flow-run.Completed).

State variants

State nameState typeDescription
ScheduledSCHEDULEDRun is scheduled for future execution
LateSCHEDULEDScheduled run was not started on time
AwaitingConcurrencySlotSCHEDULEDWaiting for a concurrency slot
AwaitingRetrySCHEDULEDWaiting before a retry attempt
PendingPENDINGRun is ready to execute
RunningRUNNINGRun is actively executing
RetryingRUNNINGRun is retrying after a failure
CompletedCOMPLETEDRun finished successfully
FailedFAILEDRun finished with an error
CrashedCRASHEDRun terminated unexpectedly (infrastructure failure)
CancelledCANCELLEDRun was cancelled
CancellingCANCELLINGCancellation was requested but not yet confirmed
PausedPAUSEDRun is paused, waiting for input or manual resumption
SuspendedPAUSEDRun is suspended and its infrastructure may be freed

Resource

LabelDescription
prefect.resource.idprefect.flow-run.{uuid}
prefect.resource.nameFlow run name (for example, crimson-fox)
prefect.run-countNumber of times this run has been attempted
prefect.state-messageMessage associated with the state transition (truncated to 100,000 characters)
prefect.state-nameState name (for example, Running)
prefect.state-timestampISO 8601 timestamp of the state transition
prefect.state-typeState type enum value (for example, RUNNING, COMPLETED)
Resource ID patternRoleWhen present
prefect.flow.{uuid}flowAlways
prefect.deployment.{uuid}deploymentWhen triggered by a deployment
prefect.work-queue.{uuid}work-queueWhen a work queue is assigned
prefect.work-pool.{uuid}work-poolWhen a work pool is assigned (includes prefect.work-pool.type label)
prefect.task-run.{uuid}task-runWhen the flow run is a subflow called from a task
prefect.tag.{tag}tagOne entry per tag on the flow run or its flow/deployment
prefect.deployment.{uuid} or prefect.automation.{uuid}creatorProvenance: which deployment or automation created this run

Payload

FieldTypeDescription
intended.fromstring or nullState type of the initial state (null for the first transition)
intended.tostringState type of the validated (new) state
initial_stateobject or nullPrevious state: type, name, message, and pause_reschedule if paused
validated_stateobjectNew state: type, name, message, and pause_reschedule if paused

prefect.flow-run.heartbeat

Emitted periodically during flow run execution when heartbeat frequency is configured. Used for liveness detection, particularly with zombie flow detection.

Resource

LabelDescription
prefect.resource.idprefect.flow-run.{uuid}
prefect.resource.nameFlow run name
prefect.versionPrefect SDK version
Resource ID patternRoleWhen present
prefect.flow.{uuid}flowAlways
prefect.deployment.{uuid}deploymentWhen triggered by a deployment
prefect.tag.{tag}tagOne entry per tag

Payload

This event has no payload.