Skip to content

Commit

Permalink
Correct scheduled slots documentation and missing open telemetry span (
Browse files Browse the repository at this point in the history
…#41899)

* Correct documentation for pool.scheduled_slots metrics

* Add missing pool.scheduled_slots telemetry span
  • Loading branch information
mattogburke authored Sep 3, 2024
1 parent c3cabc1 commit 0a816c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions airflow/jobs/scheduler_job_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a816c6

Please sign in to comment.