Skip to main content

analytics

Creates, updates, deletes, gets or lists an analytics resource.

Overview

Nameanalytics
TypeResource
Iddeno.apps.analytics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cpu_secondsnumberCPU time consumed, in seconds
kv_read_unitsnumberDeno KV read units
kv_write_unitsnumberDeno KV write units
memory_time_byte_secondsnumberMemory usage integrated over time, in byte-seconds
network_egress_bytesnumberBytes sent
network_ingress_bytesnumberBytes received
request_countnumberRequests served in the bucket
runtime_secondsnumberWall-clock runtime, in seconds
timestring (date-time)Start of the fixed 15-minute UTC bucket

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectappsince, untilGet fixed app-scoped usage analytics in a Deploy Classic-style table envelope.<br /><br />The response contains only fields and values. The current Phase 1 response returns these fields: time, request_count, cpu_seconds, runtime_seconds, memory_time_byte_seconds, network_ingress_bytes, network_egress_bytes, kv_read_units, and kv_write_units. Clients should map row values by fields&#91;&#93;.name instead of column position; future responses may include additional fields. Buckets are fixed 15-minute UTC buckets, and only buckets fully contained in the effective &#91;since, until) range are returned. Recent buckets may be delayed or updated as telemetry is ingested, and missing rollup rows inside the returned range are zero-filled. Data is available from the analytics rollup rollout time onward and is not invoice-authoritative billing data.

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
appstringThe app ID or slug. App slugs must be 3–32 characters long, may contain only lowercase letters, numbers, and hyphens, cannot contain underscores, must not start or end with a hyphen, must not have consecutive hyphens in positions 3 and 4, and cannot be a reserved slug. App IDs are UUIDs.
sincestring (date-time)Inclusive lower bound as a non-empty RFC 3339 timestamp
untilstring (date-time)Exclusive upper bound as a non-empty RFC 3339 timestamp

SELECT examples

Get fixed app-scoped usage analytics in a Deploy Classic-style table envelope.<br /><br />The response contains only fields and values. The current Phase 1 response returns these fields: time, request_count, cpu_seconds, runtime_seconds, memory_time_byte_seconds, network_ingress_bytes, network_egress_bytes, kv_read_units, and kv_write_units. Clients should map row values by fields&#91;&#93;.name instead of column position; future responses may include additional fields. Buckets are fixed 15-minute UTC buckets, and only buckets fully contained in the effective &#91;since, until) range are returned. Recent buckets may be delayed or updated as telemetry is ingested, and missing rollup rows inside the returned range are zero-filled. Data is available from the analytics rollup rollout time onward and is not invoice-authoritative billing data.

SELECT
cpu_seconds,
kv_read_units,
kv_write_units,
memory_time_byte_seconds,
network_egress_bytes,
network_ingress_bytes,
request_count,
runtime_seconds,
time
FROM deno.apps.analytics
WHERE app = '{{ app }}' -- required
AND since = '{{ since }}'
AND until = '{{ until }}'
;