Skip to content

feat: Add category dimension to task running count and new task slot metrics#19554

Draft
benhopp wants to merge 1 commit into
apache:masterfrom
benhopp:prometheus-support-for-tier-category
Draft

feat: Add category dimension to task running count and new task slot metrics#19554
benhopp wants to merge 1 commit into
apache:masterfrom
benhopp:prometheus-support-for-tier-category

Conversation

@benhopp

@benhopp benhopp commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

This patch introduces the "category" dimension to the "task/running/count" metric in the prometheus-emitter to provide better visibility into task distribution across different worker categories (tiers).

Additionally, it adds new task slot metrics dimensionalized by category:

  • taskSlot/total/count
  • taskSlot/idle/count
  • taskSlot/used/count
  • taskSlot/lazy/count
  • taskSlot/blacklisted/count

To support this, new infrastructure is added:

  1. A new getRunningTaskCountByCategory() method in TaskCountStatsProvider, TaskMaster, and TaskQueue to group the running tasks.
  2. A new getRunningTasksByCategory() method in TaskRunner which is implemented by HttpRemoteTaskRunner to gather task runner work items by their worker's category.

…metrics

This patch introduces the "category" dimension to the "task/running/count" metric in the prometheus-emitter to provide better visibility into task distribution across different worker categories (tiers).

Additionally, it adds new task slot metrics dimensionalized by category:
- taskSlot/total/count
- taskSlot/idle/count
- taskSlot/used/count
- taskSlot/lazy/count
- taskSlot/blacklisted/count

To support this, new infrastructure is added:
1) A new `getRunningTaskCountByCategory()` method in `TaskCountStatsProvider`, `TaskMaster`, and `TaskQueue` to group the running tasks.
2) A new `getRunningTasksByCategory()` method in `TaskRunner` which is implemented by `HttpRemoteTaskRunner` to gather task runner work items by their worker's category.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant