This is an automated email from the ASF dual-hosted git repository.
ferruzzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 0a816c6f0b Correct scheduled slots documentation and missing open
telemetry span (#41899)
0a816c6f0b is described below
commit 0a816c6f0b500e1b0515452e38e3446412f3e8e3
Author: Matt Burke <[email protected]>
AuthorDate: Tue Sep 3 20:39:11 2024 +0100
Correct scheduled slots documentation and missing open telemetry span
(#41899)
* Correct documentation for pool.scheduled_slots metrics
* Add missing pool.scheduled_slots telemetry span
---
airflow/jobs/scheduler_job_runner.py | 1 +
.../administration-and-deployment/logging-monitoring/metrics.rst | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/airflow/jobs/scheduler_job_runner.py
b/airflow/jobs/scheduler_job_runner.py
index 9b817ecc25..feb047ec5d 100644
--- a/airflow/jobs/scheduler_job_runner.py
+++ b/airflow/jobs/scheduler_job_runner.py
@@ -1844,6 +1844,7 @@ class SchedulerJobRunner(BaseJobRunner, LoggingMixin):
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 82597712a8..f3e69a9541 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.<pool_name>`` 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.<pool_name>`` 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.<pool_name>`` 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.<pool_name>`` 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.<dag_id>.<task_id>`` Percentage of CPU used by
a task