runtime_logs
Creates, updates, deletes, gets or lists a runtime_logs resource.
Overview
| Name | runtime_logs |
| Type | Resource |
| Id | deno.apps.runtime_logs |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
revision_id | string | Revision that produced this log entry |
span_id | string | OpenTelemetry span ID |
trace_id | string | OpenTelemetry trace ID for request correlation |
level | string | Log severity level (debug, info, warn, error) |
message | string | Log message content |
region | string | Region where the isolate was running |
timestamp | string | ISO 8601 timestamp of the log entry |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | app | start, end, revision_id, level, query, cursor, limit | Query historical runtime logs, or stream them using Server-Sent Events or JSONL.<br /><br />When end is specified, returns paginated JSON.<br />When end is omitted, streams logs in real-time using SSE or JSONL.<br /><br />Requesting Accept: application/json without end will return an error. |
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. |
cursor | string | The pagination cursor |
end | string (date-time) | End of the time range (ISO 8601). If omitted, logs are streamed in real-time |
level | string | Minimum log severity level |
limit | integer | The maximum number of items to return |
query | string | Full-text search query |
revision_id | string | Filter logs by revision ID |
start | string (date-time) | Start of the time range (ISO 8601) Required by the API on every request. |
SELECT examples
- list
Query historical runtime logs, or stream them using Server-Sent Events or JSONL.<br /><br />When end is specified, returns paginated JSON.<br />When end is omitted, streams logs in real-time using SSE or JSONL.<br /><br />Requesting Accept: application/json without end will return an error.
SELECT
revision_id,
span_id,
trace_id,
level,
message,
region,
timestamp
FROM deno.apps.runtime_logs
WHERE app = '{{ app }}' -- required
AND start = '{{ start }}'
AND end = '{{ end }}'
AND revision_id = '{{ revision_id }}'
AND level = '{{ level }}'
AND query = '{{ query }}'
AND cursor = '{{ cursor }}'
AND limit = '{{ limit }}'
;