You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "melicheradam (via GitHub)" <gi...@apache.org> on 2026/03/13 10:09:38 UTC
[I] Metric dag.dag_id.task_id.queued_duration missing [airflow]
melicheradam opened a new issue, #63503:
URL: https://github.com/apache/airflow/issues/63503
### Apache Airflow version
3.1.8
### If "Other Airflow 3 version" selected, which one?
_No response_
### What happened?
The metric `dag.dag_id.task_id.queued_duration` is not being emitted after Airflow 3 upgrade. There are multiple issues like this where metrics are reported missing (we have also noticed ti.finish, ti.start missing, but that has been fixed in 3.1.8).
### What you think should happen instead?
All of the metrics that are described in the documentation https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/metrics.html#metric-descriptions should be emitted.
### How to reproduce
Run airflow, run task, observe metrics
### Operating System
Linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Metric dag.dag_id.task_id.queued_duration missing [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed issue #63503: Metric dag.dag_id.task_id.queued_duration missing
URL: https://github.com/apache/airflow/issues/63503
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Metric dag.dag_id.task_id.queued_duration missing [airflow]
Posted by "mahesh-github (via GitHub)" <gi...@apache.org>.
mahesh-github commented on issue #63503:
URL: https://github.com/apache/airflow/issues/63503#issuecomment-4568931076
Can I take this one pls
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Metric dag.dag_id.task_id.queued_duration missing [airflow]
Posted by "wilmerdooley (via GitHub)" <gi...@apache.org>.
wilmerdooley commented on issue #63503:
URL: https://github.com/apache/airflow/issues/63503#issuecomment-4568908522
I had a look at this one. The root cause is that `queued_duration` is emitted by `TaskInstance.emit_state_change_metric(RUNNING)`, which in Airflow 2 ran when the task transitioned to RUNNING. In Airflow 3 that transition moved to the execution API (the `ti_run` route), so the call site in `taskinstance.py` no longer fires and the metric is never emitted.
Its sibling `scheduled_duration` still works because it is emitted on the QUEUED transition, which is still triggered server side from the scheduler (`scheduler_job_runner`).
The change that keeps the two symmetric is to emit `task.queued_duration` server side in the `ti_run` handler when a task goes from QUEUED to RUNNING, computing `now - queued_dttm`. The metric template already maps `task.queued_duration` to the legacy `dag.<dag_id>.<task_id>.queued_duration` name, so both the tagged and statsd forms are covered.
@seanmuth are you planning to take this one? If not, I am happy to open a PR with a test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Metric dag.dag_id.task_id.queued_duration missing [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on issue #63503:
URL: https://github.com/apache/airflow/issues/63503#issuecomment-4542793889
@seanmuth you previously fixed some of the missing metrics. Will you have time to look into this one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org