Skip to main content
Worker events track the lifecycle of worker processes and the flow runs they execute. Runner events cover flow run cancellation by locally-served deployments. For more on workers, see Workers.

Worker events

prefect.worker.started

Emitted when a worker process starts polling for work.

Resource

LabelDescription
prefect.resource.idprefect.worker.{type}.{name-slug}
prefect.resource.nameWorker name
prefect.versionPrefect SDK version
prefect.worker-typeWorker type (for example, kubernetes, process, docker)
Resource ID patternRoleWhen present
prefect.work-pool.{uuid}work-poolWhen 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 as prefect.worker.started. Same as prefect.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 as prefect.worker.started.
Resource ID patternRoleWhen present
prefect.flow-run.{uuid}flow-runAlways
prefect.flow.{uuid}flowAlways
prefect.deployment.{uuid}deploymentWhen triggered by a deployment
prefect.work-pool.{uuid}work-poolWhen attached to a work pool
prefect.tag.{tag}tagOne 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 as prefect.worker.started. Same as prefect.worker.submitted-flow-run, with additional labels on the flow-run related resource:
Additional labelDescription
prefect.infrastructure.identifierInfrastructure-specific identifier for the execution (for example, process PID)
prefect.infrastructure.status-codeExit 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

LabelDescription
prefect.resource.idprefect.runner.{name-slug}
prefect.resource.nameRunner name
prefect.versionPrefect SDK version
Resource ID patternRoleWhen present
prefect.deployment.{uuid}deploymentWhen the flow run was triggered by a deployment
prefect.flow.{uuid}flowWhen the flow is known
prefect.flow-run.{uuid}flow-runAlways
prefect.tag.{tag}tagOne entry per tag from the flow run and deployment

Payload

This event has no payload.