Skip to content

Queues metrics changelog#29674

Open
mia303 wants to merge 6 commits intoproductionfrom
queues-metrics-changelog
Open

Queues metrics changelog#29674
mia303 wants to merge 6 commits intoproductionfrom
queues-metrics-changelog

Conversation

@mia303
Copy link
Copy Markdown
Contributor

@mia303 mia303 commented Apr 7, 2026

Summary

Adding realtime metrics to Queues: updating docs & publishing changelog.

Documentation checklist

@github-actions github-actions bot added product:queues Cloudflare Queues: https://developers.cloudflare.com/queues product:changelog size/m labels Apr 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing, @cloudflare/product-owners
/src/content/docs/queues/ @elithrar, @jonesphillip, @harshil1712, @mia303, @cloudflare/pcx-technical-writing, @cloudflare/product-owners

@mia303 mia303 force-pushed the queues-metrics-changelog branch from 990fa7b to 6689de3 Compare April 7, 2026 20:22
Comment thread src/content/changelog/queues/2026-04-26-improved-queues-metrics.mdx Outdated
Comment thread src/content/changelog/queues/2026-04-26-improved-queues-metrics.mdx Outdated
Comment thread src/content/changelog/queues/2026-04-26-improved-queues-metrics.mdx Outdated
Comment thread src/content/changelog/queues/2026-04-10-improved-queues-metrics.mdx Outdated
Comment thread src/content/docs/queues/configuration/javascript-apis.mdx Outdated
Comment thread src/content/docs/queues/configuration/javascript-apis.mdx Outdated
Comment thread src/content/docs/queues/observability/metrics.mdx Outdated
@mia303 mia303 force-pushed the queues-metrics-changelog branch from 666e7cd to e0f938f Compare April 10, 2026 19:46

- **`backlog_count`** — the number of unacknowledged messages in the queue
- **`backlog_bytes`** — the total size of those messages in bytes
- **`oldest_message_timestamp`** — the timestamp of the oldest unacknowledged message, useful for calculating how far behind your consumers are
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put oldest_message_timestamp_ms to match the other two fields which are following the HTTP naming scheme.

Call `env.QUEUE.metrics()` to get realtime backlog metrics:

```ts
const metrics = await env.QUEUE.metrics();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference would be to write this as:

const {
  backlogCount,                // number
  backlogBytes,                // number
  oldestMessageTimestamp,      // Date | undefined
} = await env.QUEUE.metrics()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge-yet product:changelog product:queues Cloudflare Queues: https://developers.cloudflare.com/queues size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants