Skip to main content

runtime_logs

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

Overview

Nameruntime_logs
TypeResource
Iddeno.apps.runtime_logs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
revision_idstringRevision that produced this log entry
span_idstringOpenTelemetry span ID
trace_idstringOpenTelemetry trace ID for request correlation
levelstringLog severity level (debug, info, warn, error)
messagestringLog message content
regionstringRegion where the isolate was running
timestampstringISO 8601 timestamp of the log entry

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectappstart, end, revision_id, level, query, cursor, limitQuery 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.

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.
cursorstringThe pagination cursor
endstring (date-time)End of the time range (ISO 8601). If omitted, logs are streamed in real-time
levelstringMinimum log severity level
limitintegerThe maximum number of items to return
querystringFull-text search query
revision_idstringFilter logs by revision ID
startstring (date-time)Start of the time range (ISO 8601) Required by the API on every request.

SELECT examples

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 }}'
;