jason810496 commented on code in PR #52815:
URL: https://github.com/apache/airflow/pull/52815#discussion_r2462402892
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -2235,6 +2240,12 @@ def _emit_running_ti_metrics(self, session: Session =
NEW_SESSION) -> None:
self.previous_ti_running_metrics = ti_running_metrics
+ @provide_session
+ def _emit_running_dags_metric(self, session: Session = NEW_SESSION) ->
None:
+ stmt = select(func.count()).select_from(DagRun).where(DagRun.state ==
DagRunState.RUNNING)
+ running_dags = session.scalar(stmt)
+ Stats.gauge("scheduler.running_dags", running_dags)
Review Comment:
Based on naming convention of existing metrics, would somehow like
`dagrun.running` be better?
Since most of the naming are like `<entity>.<status>` and the new naming
might be more align with `dagrun_metrics_interval` config meaning.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]