analytics
Creates, updates, deletes, gets or lists an analytics resource.
Overview
| Name | analytics |
| Type | Resource |
| Id | deno.apps.analytics |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
cpu_seconds | number | CPU time consumed, in seconds |
kv_read_units | number | Deno KV read units |
kv_write_units | number | Deno KV write units |
memory_time_byte_seconds | number | Memory usage integrated over time, in byte-seconds |
network_egress_bytes | number | Bytes sent |
network_ingress_bytes | number | Bytes received |
request_count | number | Requests served in the bucket |
runtime_seconds | number | Wall-clock runtime, in seconds |
time | string (date-time) | Start of the fixed 15-minute UTC bucket |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | app | since, until | 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[].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 [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.
| Name | Datatype | Description |
|---|---|---|
app | string | The 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. |
since | string (date-time) | Inclusive lower bound as a non-empty RFC 3339 timestamp |
until | string (date-time) | Exclusive upper bound as a non-empty RFC 3339 timestamp |
SELECT examples
- list
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[].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 [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 }}'
;