You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/22 18:18:51 UTC

[GitHub] [airflow] arbass22 opened a new issue #14364: Missing schedule_delay metric

arbass22 opened a new issue #14364:
URL: https://github.com/apache/airflow/issues/14364


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 2.0.0 but applicable to master
   
   **Environment**: Running on ECS but not relevant to question
   
   
   **What happened**: I am not seeing the metric dagrun.schedule_delay.<dag_id> being reported.  A search in the codebase seems to reveal that it no longer exists.   It was originally added in https://github.com/apache/airflow/pull/5050.
   
   <!-- (please include exact error messages if you can) -->
   
   <!-- What do you think went wrong? -->
   I suspect either:
   1.  This metric was intentionally removed, in which case the docs should be updated to remove it.
   2. It was unintentionally removed during a refactor, in which case we should add it back.
   3. I am bad at searching through code, and someone could hopefully point me to where it is reported from now. 
   
   **How to reproduce it**:
   https://github.com/apache/airflow/search?q=schedule_delay
   
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] jhtimmins commented on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
jhtimmins commented on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-783768218


   @arbass22 Thanks for bringing this up! Looks like you're right, the functionality was removed when support for multiple schedulers (AIP-15) was introduced https://github.com/apache/airflow/commit/73b9163a8f55ce3d5bf6aec0a558952c27dd1b55#diff-bde85feb359b12bdd358aed4106ef4fccbd8fa9915e16b9abb7502912a1c1ab3L799.
   
   @kaxil @ashb Do either of you know if this was intentional, or if it was removed accidentally during the merge?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ianlofs commented on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
ianlofs commented on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-809521417


   Hello! Any updates on this? @ashb. This is definitely preventing us from upgrading to Airflow 2 as these latency metrics are really important to how we monitor Airflow. 


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-783571794


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-790769619


   When you say "emitted all the time" what are you thinking? Could you provide a bit more detail to what you mean?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ianlofs commented on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
ianlofs commented on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-789984552


   Found this because I was doing a deep five through this recently because I am currently trying to figure out the best way to monitor for DAGs that never start. This is where this is getting emitted in the 1.10.X series, https://github.com/apache/airflow/blob/v1-10-stable/airflow/jobs/scheduler_job.py#L1296. If this is getting added back It would be really useful if the metric was emitted all the time instead of only when a new DagRun is getting created. This would result in more metrics getting sent but would allow for monitoring on if a DAG was missed all together (for instance due to `catchup = False` being set on a Dag and that Dag running longer than the schedule period. Would definitely be willing to add a PR to add in this functionality. 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb closed issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
ashb closed issue #14364:
URL: https://github.com/apache/airflow/issues/14364


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-784041864


   Whops, no, not intentionally removed.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ianlofs commented on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
ianlofs commented on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-793172918


   @ashb Ah yeah for sure!
   
   So ideally everyone who created a DAG would know to setup `catchup=True` for DAGs where this is necessary. However this is not always the case in practice when you have many teams utilizing Airflow that you are trying to support. It would be nice to be able to use latency metrics to know when a DAG that should be starting isn't starting (this could be because a previous DAG run is still executing). However it also could be some other, unreported failure or error. If there was a steady stream of latency metrics for DAGs the absence of those metrics could be used to alert on. So instead of only emitting a latency metric every time a a new DagRun is created emitting a latency metric for each DAG every time the scheduler parses the DAGs. I guess in the case of a new DagRun not being created this would be the most recent latency.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ianlofs edited a comment on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
ianlofs edited a comment on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-789984552


   Found this because I was doing a deep dive through this recently because I am currently trying to figure out the best way to monitor for DAGs that never start. This is where this is getting emitted in the 1.10.X series, https://github.com/apache/airflow/blob/v1-10-stable/airflow/jobs/scheduler_job.py#L1296. If this is getting added back It would be really useful if the metric was emitted all the time instead of only when a new DagRun is getting created. This would result in more metrics getting sent but would allow for monitoring on if a DagRun was missed all together (for instance due to `catchup = False` being set on a Dag and that Dag running longer than the schedule period. Would definitely be willing to add a PR to add in this functionality. 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ianlofs edited a comment on issue #14364: Missing schedule_delay metric

Posted by GitBox <gi...@apache.org>.
ianlofs edited a comment on issue #14364:
URL: https://github.com/apache/airflow/issues/14364#issuecomment-789984552


   Found this because I was doing a deep dive through this recently because I am currently trying to figure out the best way to monitor for DAGs that never start. This is where this is getting emitted in the 1.10.X series, https://github.com/apache/airflow/blob/v1-10-stable/airflow/jobs/scheduler_job.py#L1296. If this is getting added back It would be really useful if the metric was emitted all the time instead of only when a new DagRun is getting created. This would result in more metrics getting sent but would allow for monitoring on if a DAG was missed all together (for instance due to `catchup = False` being set on a Dag and that Dag running longer than the schedule period. Would definitely be willing to add a PR to add in this functionality. 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org