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 name | State type | Description |
|---|---|---|
Scheduled | SCHEDULED | Run is scheduled for future execution |
Late | SCHEDULED | Scheduled run was not started on time |
AwaitingConcurrencySlot | SCHEDULED | Waiting for a concurrency slot |
AwaitingRetry | SCHEDULED | Waiting before a retry attempt |
Pending | PENDING | Run is ready to execute |
Running | RUNNING | Run is actively executing |
Retrying | RUNNING | Run is retrying after a failure |
Completed | COMPLETED | Run finished successfully |
Failed | FAILED | Run finished with an error |
Crashed | CRASHED | Run terminated unexpectedly (infrastructure failure) |
Cancelled | CANCELLED | Run was cancelled |
Cancelling | CANCELLING | Cancellation was requested but not yet confirmed |
Paused | PAUSED | Run is paused, waiting for input or manual resumption |
Suspended | PAUSED | Run is suspended and its infrastructure may be freed |
Resource
| Label | Description |
|---|---|
prefect.resource.id | prefect.flow-run.{uuid} |
prefect.resource.name | Flow run name (for example, crimson-fox) |
prefect.run-count | Number of times this run has been attempted |
prefect.state-message | Message associated with the state transition (truncated to 100,000 characters) |
prefect.state-name | State name (for example, Running) |
prefect.state-timestamp | ISO 8601 timestamp of the state transition |
prefect.state-type | State type enum value (for example, RUNNING, COMPLETED) |
Related resources
| Resource ID pattern | Role | When present |
|---|---|---|
prefect.flow.{uuid} | flow | Always |
prefect.deployment.{uuid} | deployment | When triggered by a deployment |
prefect.work-queue.{uuid} | work-queue | When a work queue is assigned |
prefect.work-pool.{uuid} | work-pool | When a work pool is assigned (includes prefect.work-pool.type label) |
prefect.task-run.{uuid} | task-run | When the flow run is a subflow called from a task |
prefect.tag.{tag} | tag | One entry per tag on the flow run or its flow/deployment |
prefect.deployment.{uuid} or prefect.automation.{uuid} | creator | Provenance: which deployment or automation created this run |
Payload
| Field | Type | Description |
|---|---|---|
intended.from | string or null | State type of the initial state (null for the first transition) |
intended.to | string | State type of the validated (new) state |
initial_state | object or null | Previous state: type, name, message, and pause_reschedule if paused |
validated_state | object | New 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
| Label | Description |
|---|---|
prefect.resource.id | prefect.flow-run.{uuid} |
prefect.resource.name | Flow run name |
prefect.version | Prefect SDK version |
Related resources
| Resource ID pattern | Role | When present |
|---|---|---|
prefect.flow.{uuid} | flow | Always |
prefect.deployment.{uuid} | deployment | When triggered by a deployment |
prefect.tag.{tag} | tag | One entry per tag |