Technologies/Prefect/prefect.flow_run.duration
PrefectPrefectMetric

prefect.flow_run.duration

Flow run execution duration
Dimensions:None
Available on:PrometheusPrometheus (1)DatadogDatadog (1)Native (1)
Interface Metrics (3)
PrometheusPrometheus
Duration of flow runs in seconds
Dimensions:None
DatadogDatadog
Duration of flow run execution from start to completion
Dimensions:None
Native
Duration of completed flow runs in seconds
Dimensions:None

Technical Annotations (40)

Configuration Parameters (3)
persist_resultrecommended: True
Enables result data persistence to prevent task re-execution on retry
remote_storagerecommended: configured
Required for result persistence across flow retries
max_workers
Task runner concurrency limit; lowering it did not resolve hanging issue
Technical References (37)
FlowRunnercomponentstate.resultcomponentflow.get_tasks()componenttask stateconceptresult data payloadconceptSequentialTaskRunnercomponentworker podscomponentconcurrencyconceptConcurrentTaskRunnercomponentwait_forcomponentDaskTaskRunnercomponentinteractive workflowconceptemit_eventcomponentprefect.resource.idcomponentread_flow_runscomponentset_flow_run_statecomponentLocalAgentcomponentk8scomponentzombie flow runconceptterminal stateconceptCrashedcomponentgenerator functionsconceptserializationconcepttask runnercomponentAnyIO task groupscomponentasyncio.gathercomponenttask.submit()componentfuture.result()componentThreadPoolTaskRunnercomponentRayTaskRunnercomponentprefect_test_harnesscomponentLazarus ServicecomponentSubmitted stateconceptRunning stateconceptexecution clustercomponentKarpentercomponentspot instanceconcept
Related Insights (15)
Flow rebuilding prevents task state resumption in FlowRunnerwarning
Manual task state completion ignored on flow retrywarning
Long-running tasks monopolize worker resources and block concurrencywarning
Tag concurrency limit deadlock with dependent tasks in Prefect 3.2.15+critical
Missing pipeline metrics delay data quality issue detectionwarning
Pipeline duration anomalies indicate performance degradation or failureswarning
Time-based polling obscures pipeline trigger causes and creates constant execution overheadwarning
Flow runs stuck in Cancelling state trigger persistent alertswarning
LocalAgent blocks on shutdown until submitted work completesinfo
Zombie flow runs prevent terminal state due to infrastructure or network failurescritical
Infinite or large generators returned from flows cause blockingwarning
Nested flow runs block parent execution and shutdown task runnersinfo
Tasks stuck in Running state with task.submit() pattern cause flow hangscritical
Flow runs stuck in Submitted state fail to enter Running statewarning
Karpenter spot instance termination not detected by Prefect causing stuck flowscritical