You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
task.queued_duration metric not emitted in Airflow 3 (all executors) #66067
task.queued_duration (legacy: dag.<dag_id>.<task_id>.queued_duration) is never emitted in Airflow 3 regardless of executor (LocalExecutor, CeleryExecutor, KubernetesExecutor). The companion metric task.scheduled_duration emits correctly.
No "cannot record queued_duration" warnings appear in logs, the metric emission code is never reached, not silently skipped.
How to reproduce:
Run any DAG on Airflow 3 with StatsD configured
Observe task.scheduled_duration (or legacy dag.<dag_id>.<task_id>.scheduled_duration) appears in metrics
Observe task.queued_duration (or legacy dag.<dag_id>.<task_id>.queued_duration) is absent
What you think should happen instead?
task.queued_duration should be emitted each time a task transitions from QUEUED --> RUNNING, matching Airflow 2 behavior.
Operating System
linux
Deployment
None
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
task.scheduled_duration emits correctly because the scheduler still owns the SCHEDULED --> QUEUED transition and calls emit_state_change_metric(QUEUED) directly.
queued_dttm is correctly set when the task enters QUEUED state , so the timing data is available, it just never gets consumed for the metric.
This looks like a regression from Airflow 2 where queued_duration was reliably emitted for all executor types.
I have started reproducing the problem locally on Airflow 3.2.0 and confirmed that the task.queued_duration metric is not emitted, while the timing data seems to be available.
I will investigate where the metric emission is missing and propose a fix.
Activity
saidiraja commentedon Apr 30, 2026
Hi, I would like to work on this issue.
I have started reproducing the problem locally on Airflow 3.2.0 and confirmed that the
task.queued_durationmetric is not emitted, while the timing data seems to be available.I will investigate where the metric emission is missing and propose a fix.
Thanks!
Fix missing task.queued_duration metric in Airflow 3
Fix missing task.queued_duration metric in Airflow 3 (apache#67592)
[v3-4-test] Fix missing task.queued_duration metric in Airflow 3 (#67592
[v3-4-test] Fix missing task.queued_duration metric in Airflow 3 (#67592