Metrics (3)
Last updated Apr 28, 2026 Queues expose metrics which allow you to measure the queue backlog, consumer concurrency, and message operations.
The metrics displayed in the Cloudflare dashboard ↗︎ are queried from Cloudflare’s GraphQL Analytics API. You can access the metrics programmatically via GraphQL or HTTP client.
Metrics
Backlog
Queues export the below metrics within the queuesBacklogAdaptiveGroups dataset.
| Metric | GraphQL Field Name | Description |
|---|---|---|
| Backlog bytes | bytes |
Average size of the backlog, in bytes |
| Backlog messages | messages |
Average size of the backlog, in number of messages |
The queuesBacklogAdaptiveGroups dataset provides the following dimensions for filtering and grouping queries:
queueID- ID of the queuedatetime- Timestamp for when the message was sentdate- Timestamp for when the message was sent, truncated to the start of a daydatetimeHour- Timestamp for when the message was sent, truncated to the start of an hourdatetimeMinute- Timestamp for when the message was sent, truncated to the start of a minute
Consumer concurrency
Queues export the below metrics within the queueConsumerMetricsAdaptiveGroups dataset.
| Metric | GraphQL Field Name | Description |
|---|---|---|
| Avg. Consumer Concurrency | concurrency |
Average number of concurrent consumers over the period |
The queueConsumerMetricsAdaptiveGroups dataset provides the following dimensions for filtering and grouping queries:
queueID- ID of the queuedatetime- Timestamp for the consumer metricsdate- Timestamp for the consumer metrics, truncated to the start of a daydatetimeHour- Timestamp for the consumer metrics, truncated to the start of an hourdatetimeMinute- Timestamp for the consumer metrics, truncated to the start of a minute
Message operations
Queues export the below metrics within the queueMessageOperationsAdaptiveGroups dataset.
| Metric | GraphQL Field Name | Description |
|---|---|---|
| Total billable operations | billableOperations |
Sum of billable operations (writes, reads, and deletes) over the time period |
| Total Bytes | bytes |
Sum of bytes read, written, and deleted from the queue |
| Lag | lagTime |
Average lag time in milliseconds between when the message was written and the operation to consume the message. |
| Retries | retryCount |
Average number of retries per message |
| Message Size | messageSize |
Maximum message size over the specified period |
The queueMessageOperationsAdaptiveGroups dataset provides the following dimensions for filtering and grouping queries:
queueID- ID of the queueactionType- The type of message operation. Can beWriteMessage,ReadMessageorDeleteMessageconsumerType- The queue consumer type. Can beworkerorhttp. Only applicable forReadMessageandDeleteMessageaction typesoutcome- The outcome of the message operation. Only applicable forDeleteMessageaction types. Can besuccess,dlqorfail.datetime- Timestamp for the message operationdate- Timestamp for the message operation, truncated to the start of a daydatetimeHour- Timestamp for the message operation, truncated to the start of an hourdatetimeMinute- Timestamp for the message operation, truncated to the start of a minute
Realtime backlog
You can access realtime backlog metrics via the Queues REST API and JavaScript API. These metrics provide point-in-time values rather than aggregated data.
| Metric | Field Name | Description |
|---|---|---|
| Backlog count | backlog_count |
Number of messages currently in the queue |
| Backlog bytes | backlog_bytes |
Total size of messages in the queue, in bytes |
| Oldest message timestamp | oldest_message_timestamp_ms |
Timestamp (in milliseconds) of the oldest message in the queue |
To retrieve these metrics via the REST API, use the metrics endpoint (/accounts/{account_id}/queues/{queue_id}/metrics).
These fields are also included in metadata.metrics when calling send(), sendBatch(), or metrics() via the JavaScript API.
Example GraphQL Queries
Get average queue backlog over time period
query QueueBacklog(
$accountTag: string!
$queueId: string!
$datetimeStart: Time!
$datetimeEnd: Time!
) {
viewer {
accounts(filter: { accountTag: $accountTag }) {
queueBacklogAdaptiveGroups(
limit: 10000
filter: {
queueId: $queueId
datetime_geq: $datetimeStart
datetime_leq: $datetimeEnd
}
) {
avg {
messages
bytes
}
}
}
}
}
Get average consumer concurrency by hour
query QueueConcurrencyByHour(
$accountTag: string!
$queueId: string!
$datetimeStart: Time!
$datetimeEnd: Time!
) {
viewer {
accounts(filter: { accountTag: $accountTag }) {
queueConsumerMetricsAdaptiveGroups(
limit: 10000
filter: {
queueId: $queueId
datetime_geq: $datetimeStart
datetime_leq: $datetimeEnd
}
orderBy: [datetimeHour_DESC]
) {
avg {
concurrency
}
dimensions {
datetimeHour
}
}
}
}
}
Get message operations by minute
query QueueMessageOperationsByMinute(
$accountTag: string!
$queueId: string!
$datetimeStart: Date!
$datetimeEnd: Date!
) {
viewer {
accounts(filter: { accountTag: $accountTag }) {
queueMessageOperationsAdaptiveGroups(
limit: 10000
filter: {
queueId: $queueId
datetime_geq: $datetimeStart
datetime_leq: $datetimeEnd
}
orderBy: [datetimeMinute_DESC]
) {
count
sum {
bytes
}
dimensions {
datetimeMinute
}
}
}
}
}
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/queues/observability/metrics/#page","headline":"Metrics","description":"Query Cloudflare Queues backlog, concurrency, and message operation metrics via GraphQL.","url":"https://developers.cloudflare.com/queues/observability/metrics/","inLanguage":"en","image":"https://developers.cloudflare.com/queues/observability/metrics/og.png?v=8726244059d387fc","dateModified":"2026-04-28","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Browse code examples for producing and consuming messages with Cloudflare Queues. title: Examples image: https://developers.cloudflare.com/queues/examples/og.png?v=53f94ef9000b8fe1
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/queues/llms.txt
Use this file to discover all available pages before exploring further.
Docs