Worker events
prefect.worker.started
Emitted when a worker process starts polling for work.
Resource
| Label | Description |
|---|---|
prefect.resource.id | prefect.worker.{type}.{name-slug} |
prefect.resource.name | Worker name |
prefect.version | Prefect SDK version |
prefect.worker-type | Worker type (for example, kubernetes, process, docker) |
Related resources
| Resource ID pattern | Role | When present |
|---|---|---|
prefect.work-pool.{uuid} | work-pool | When the worker is attached to a work pool |
Payload
This event has no payload.prefect.worker.stopped
Emitted when a worker process shuts down. Uses the follows field to link back
to the corresponding started event.
Resource
Same asprefect.worker.started.
Related resources
Same asprefect.worker.started.
Payload
This event has no payload.prefect.worker.submitted-flow-run
Emitted when a worker submits a flow run for execution on infrastructure.
Resource
Same asprefect.worker.started.
Related resources
| Resource ID pattern | Role | When present |
|---|---|---|
prefect.flow-run.{uuid} | flow-run | Always |
prefect.flow.{uuid} | flow | Always |
prefect.deployment.{uuid} | deployment | When triggered by a deployment |
prefect.work-pool.{uuid} | work-pool | When attached to a work pool |
prefect.tag.{tag} | tag | One entry per tag |
Payload
This event has no payload.prefect.worker.executed-flow-run
Emitted when a worker finishes executing a flow run (regardless of outcome). Uses
the follows field to link back to the corresponding submitted-flow-run event.
Resource
Same asprefect.worker.started.
Related resources
Same asprefect.worker.submitted-flow-run,
with additional labels on the flow-run related resource:
| Additional label | Description |
|---|---|
prefect.infrastructure.identifier | Infrastructure-specific identifier for the execution (for example, process PID) |
prefect.infrastructure.status-code | Exit status code of the infrastructure process |
Payload
This event has no payload.Runner events
prefect.runner.cancelled-flow-run
Emitted when a runner cancels a flow run that was being served locally via
flow.serve() or the Runner API.
Resource
| Label | Description |
|---|---|
prefect.resource.id | prefect.runner.{name-slug} |
prefect.resource.name | Runner name |
prefect.version | Prefect SDK version |
Related resources
| Resource ID pattern | Role | When present |
|---|---|---|
prefect.deployment.{uuid} | deployment | When the flow run was triggered by a deployment |
prefect.flow.{uuid} | flow | When the flow is known |
prefect.flow-run.{uuid} | flow-run | Always |
prefect.tag.{tag} | tag | One entry per tag from the flow run and deployment |