Skip to content

Add background job queue-age metrics - #14746

Merged
Turbo87 merged 2 commits into
rust-lang:mainfrom
Turbo87:queue-age
Sep 22, 2026
Merged

Turbo87 merged 2 commits into
rust-lang:mainfrom
Turbo87:queue-age

Conversation

@Turbo87

@Turbo87 Turbo87 commented Sep 21, 2026

Copy link
Copy Markdown
Member

Queue-age metrics let us move background-job health thresholds out of application code and configure them in Datadog.

The new crates_io.background_jobs.oldest_age gauge reports seconds since the oldest outstanding job was enqueued, grouped by job type and priority. It includes running jobs and reports zero after a queue drains. Existing service checks remain in place until replacement monitors are ready.

Related

@Turbo87 Turbo87 added the C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear label Sep 21, 2026
@Turbo87
Turbo87 requested a review from a team September 21, 2026 15:14
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

The grouped queue snapshot includes the oldest age as a duration using the database clock. Existing metric consumers continue to report counts.
The worker records queue ages in seconds alongside counts with the same job and priority attributes. Previously observed queues report zero after draining, and failed collection records no partial snapshot.
@rustbot

rustbot commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Turbo87
Turbo87 merged commit f4aa1b0 into rust-lang:main Sep 22, 2026
12 checks passed
@Turbo87
Turbo87 deleted the queue-age branch September 22, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants