diff --git a/airflow/jobs/scheduler_job_runner.py b/airflow/jobs/scheduler_job_runner.py index 9b817ecc25716..feb047ec5d7d8 100644 --- a/airflow/jobs/scheduler_job_runner.py +++ b/airflow/jobs/scheduler_job_runner.py @@ -1844,6 +1844,7 @@ def _emit_pool_metrics(self, session: Session = NEW_SESSION) -> None: span.set_attribute(f"pool.queued_slots.{pool_name}", slot_stats["queued"]) span.set_attribute(f"pool.running_slots.{pool_name}", slot_stats["running"]) span.set_attribute(f"pool.deferred_slots.{pool_name}", slot_stats["deferred"]) + span.set_attribute(f"pool.scheduled_slots.{pool_name}", slot_stats["scheduled"]) @provide_session def adopt_or_reset_orphaned_tasks(self, session: Session = NEW_SESSION) -> int: diff --git a/docs/apache-airflow/administration-and-deployment/logging-monitoring/metrics.rst b/docs/apache-airflow/administration-and-deployment/logging-monitoring/metrics.rst index 82597712a8abc..f3e69a9541df8 100644 --- a/docs/apache-airflow/administration-and-deployment/logging-monitoring/metrics.rst +++ b/docs/apache-airflow/administration-and-deployment/logging-monitoring/metrics.rst @@ -242,8 +242,8 @@ Name Description ``pool.running_slots`` Number of running slots in the pool. Metric with pool_name tagging. ``pool.deferred_slots.`` Number of deferred slots in the pool ``pool.deferred_slots`` Number of deferred slots in the pool. Metric with pool_name tagging. -``pool.scheduled_tasks.`` Number of scheduled tasks in the pool -``pool.scheduled_tasks`` Number of scheduled tasks in the pool. Metric with pool_name tagging. +``pool.scheduled_slots.`` Number of scheduled slots in the pool +``pool.scheduled_slots`` Number of scheduled slots in the pool. Metric with pool_name tagging. ``pool.starving_tasks.`` Number of starving tasks in the pool ``pool.starving_tasks`` Number of starving tasks in the pool. Metric with pool_name tagging. ``task.cpu_usage_percent..`` Percentage of CPU used by a task