Skip to main content

metrics

Creates, updates, deletes, gets or lists a metrics resource.

Overview

Namemetrics
TypeResource
Idcloudflare.queues.metrics

Fields

The following fields are returned by SELECT queries:

Queue metrics.

NameDatatypeDescription
backlog_bytesnumberThe size in bytes of unacknowledged messages in the queue.
backlog_countnumberThe number of unacknowledged messages in the queue.
oldest_message_timestamp_msnumberUnix timestamp in milliseconds of the oldest unacknowledged message in the queue. Returns 0 if unknown.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectqueue_id, account_idReturn 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
queue_idstringThe Cloudflare Queue ID.

SELECT examples

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
;