metrics
Creates, updates, deletes, gets or lists a metrics resource.
Overview
| Name | metrics |
| Type | Resource |
| Id | cloudflare.queues.metrics |
Fields
The following fields are returned by SELECT queries:
- list
Queue metrics.
| Name | Datatype | Description |
|---|---|---|
backlog_bytes | number | The size in bytes of unacknowledged messages in the queue. |
backlog_count | number | The number of unacknowledged messages in the queue. |
oldest_message_timestamp_ms | number | Unix timestamp in milliseconds of the oldest unacknowledged message in the queue. Returns 0 if unknown. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | queue_id, account_id | Return best-effort metrics for a queue. Values may be approximate due to the distributed nature of queues. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
queue_id | string | The Cloudflare Queue ID. |
SELECT examples
- list
Return best-effort metrics for a queue. Values may be approximate due to the distributed nature of queues.
SELECT
backlog_bytes,
backlog_count,
oldest_message_timestamp_ms
FROM cloudflare.queues.metrics
WHERE queue_id = '{{ queue_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;