Recent runs of a running app, one per request
What the Logs tab shows: the app’s last stored output grouped into invocations, newest first. One invocation is one run of a handler:
a request (handler: fetch), a cron run (scheduled), a queue or alarm delivery or other background wake-up (trigger), or output no run claimed
(system: a line printed with no request after it, a worker that stopped). The Logs tab shows scheduled runs by default and hides trigger ones.
The control plane stores none of it: the lines come from the app’s host (retention in the answer).
Field names follow OpenTelemetry’s semantic conventions where they map: attributes carry http.request.method, url.path, url.scheme,
server.address, http.response.status_code and faas.trigger (http, timer or other; a cron run has no HTTP attributes), each exception
exception.type, exception.message and exception.stacktrace, each console line severity_number and severity_text. trace_id, span_id
and faas.invocation_id will appear when the runtime tags lines with a request id; they are absent today.
Console lines are matched to a request by order (logs_matched_by: order): the host records no request id on a line, so the lines seen since the
previous run are attached to the next one. When requests overlap, a line can land under the wrong one.
A host from logs step 2 on stamps every stored line with the time it read it and reports each request’s CPU time (cpu_ms) and a cron run’s
expression (attributes["faas.cron"]). A host before that records none: time is null, cpu_ms is null and a cron run has no faas.cron, and the
answer is otherwise the same. The host still records no level (severity_number is 0 on a console line; a stack trace has frames only if the
runtime printed them).
Time range. from and to keep the runs that finished in that range (epoch milliseconds or an ISO 8601 date-time with a zone; to is optional).
On a host with the time window the range is read from the host in full, newest first, up to 10,000 lines or about 10 MiB in all (window.windowed true; window.truncated says when the range holds more and older runs are left out). On a host from before it, the range is cut from the host’s last lines stored lines (1000 at most), so a busy app’s old runs may lie beyond it: window.truncated says so. A run with no
time (a line an older host stored) cannot be placed in a range and is left out of it (window.untimed counts them); on a host that records no times
(window.times false) a range therefore answers an empty list. window says what the answer covers.
Removed before an invocation is returned, exactly as in GET /v1/apps/{project}/logs: the query string, the http:// scheme (shown https://),
and every secret value of 8 characters or more (also URL-encoded, JSON-escaped, base64 and hex), replaced by [redacted]. A message over 16 KiB is cut.
/v1/apps/{project}/invocationsAuthorizationBearer token · headerrequiredA team API key, sbk_..., from Settings, API keys.
x-api-keyAPI key · headerrequiredThe same key, in a header of its own.
projectstringrequiredThe app's name, unique within the team. 3 to 51 characters (or 1), lowercase letters, digits and dashes, not starting or ending with a dash.
linesintegerHow many of the host's last stored lines to read, 1 to 1000. Default 500, or 1000 when from or to is set. An invocation takes one request line and the lines before it, so the answer has fewer invocations than lines.
statusstring[]ok (the run was not an error), error (status_code is ERROR: an exception, a failed outcome, a 5xx, or a cron run that did not answer 2xx), a code such as 404 or a class such as 5xx (requests only). Repeat the parameter or comma-separate.
methodstring[]HTTP methods (requests only), repeated or comma-separated.
handlerstring[]Only these kinds of run: fetch, scheduled, trigger, system. Repeat or comma-separate. Default: all.
pathstringA text the request path must contain (case-insensitive, at most 200 characters). Only requests have a path.
searchstringA text the method, path, a console line or an exception must contain (case-insensitive, at most 200 characters).
levelstringOnly runs with a line or exception of at least this level. warn is 13 and up, error 17 and up. An exception counts as an error; a console line has a level only where the host recorded one (none yet), so today this finds runs with an exception.
warnerrorfromstringOnly runs that finished at or after this time: epoch milliseconds, or an ISO 8601 date-time with a zone (2026-11-24T08:00:00Z). Needs a host that stamps its lines (window.times).
tostringOnly runs that finished at or before this time, in the same forms as from; must be after from. Default: now.
The invocations, newest first.
projectstringrequiredinvocationsInvocation[]requiredShow propertiesHide properties
InvocationidstringrequiredUnique within one answer or stream, not across them.
handlerstringrequiredfetch: a request. scheduled: a cron run. trigger: a queue or alarm delivery or other background wake-up. system: output no run claimed.
fetchscheduledtriggersystemtimeinteger | nullrequiredWhen it finished, ms since the epoch. Null on a line an older host stored (it has no stamp).
outcomestringrequiredThe host's outcome: ok, exception, exceededCpu, exceededWallTime, canceled, ...
status_codestringrequiredOpenTelemetry span status: ERROR for an exception, a failed outcome, a 5xx, or a cron or background run the app did not answer with 2xx.
UNSETERRORduration_msnumber | nullrequiredFrom arrival to reply, so queue wait included. Null for system.
cpu_msnumber | nullrequiredThe CPU time the runtime measured for the request, in ms. Null when the host reports none: a host from before logs step 2, a streamed or non-string body, a compatibility date before 2026-11-02.
attributesobjectrequiredOpenTelemetry attributes. A request has http.request.method, url.path (no query), url.scheme (https), server.address, http.response.status_code and faas.trigger: http; a cron run faas.trigger: timer and, when the host reports it, faas.cron (the expression, such as */5 * * * *); a background run faas.trigger: other; system has none. trace_id, span_id and faas.invocation_id will join them.
exceptionsobject[]requiredShow propertiesHide properties
objecttimeinteger | nullrequiredexception.typestringrequiredThe error's name, or WorkerStopped when the host stopped the worker (the message says why).
exception.messagestringrequiredexception.stacktracestringPresent only when frames follow the first line; the runtime prints none for most errors today.
logsobject[]requiredWhat the app printed, oldest first, matched to this run by order.
Show propertiesHide properties
objecttimeinteger | nullrequiredseverity_numberintegerrequiredOpenTelemetry severity: 0 unspecified (the host records no level yet), 13 warn, 17 error.
severity_textstringbodystringrequiredsourcestringrequiredhost for a line sproutd wrote about the app, app for what the app printed.
apphostlogs_matched_bystringrequiredHow lines were attached: by order, because the host records no request id on a line.
orderlogs_droppedintegerrequiredLines that did not fit (at most 200 or 64 KiB wait for a run) and were dropped, oldest first.
retentionstringrequiredHow long the host keeps the app's output, in words.
logs_matched_bystringrequiredorderwindowobjectrequiredShow propertiesHide properties
sourcestringrequiredWhat bounds the answer: the last lines stored lines, or a time range cut from them.
linestimelinesintegerrequiredThe lines asked.
readintegerrequiredLines the host returned.
frominteger | nullrequiredThe range's start as asked, ms since the epoch; null without a range.
tointeger | nullrequiredThe range's end as asked; null without one (or with only from).
timesbooleanrequiredWhether the host stamps its stored lines. False for a host from before logs step 2: no range can be answered there.
oldestinteger | nullrequiredThe oldest time stamped on a line read, ms since the epoch; null when none has one.
newestinteger | nullrequiredThe newest time stamped on a line read.
windowedbooleanrequiredTrue when the host cut the range itself, so it was read in full up to the page cap. False for a host from before the time window: the range was cut from its last lines lines.
truncatedbooleanrequiredTrue when older runs of the range exist that this answer does not reach: with windowed, the page cap (10 pages of the host) was hit; otherwise the range starts before oldest and the read hit lines.
untimedintegerrequiredRuns read that have no time (lines an older host stored). A range leaves them out.
totalintegerrequiredInvocations in the window (inside the range, when there is one) before the other filters.
A parameter is malformed or out of range (invalid, with its path): a bad status, level, lines, from or to, or a to that is not after from.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredinvaliderrorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerNo key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerThe key lacks a grant (reason: forbidden, need: "<resource>:<action>").
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredforbiddenneedstringrequiredThe grant, as <resource>:<action>, for example app:write.
No such app, build, secret, manifest or claim in this team (another team's resource looks the same).
errorstringrequiredA message for people. Do not parse it.
reasonstringA stable, machine-readable cause, when there is one.
pathstringThe request field at fault.
needstringThe grant a 403 asks for, app:write for example.
retry_after_sintegerData routes: too many requests in flight or an empty bucket (rate; note retry_after, without _s), or key-rate-limited. Honor Retry-After.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredkey-rate-limitedretry_after_sintegerrequiredSeconds to wait; also the Retry-After header.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredrateretry_afterintegerrequiredSeconds to wait; also the Retry-After header.
The host agent answered something the Cloud could not handle (reason: agent-error).
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredagent-errorThe app's host is not reachable (host-unavailable), the app is not running on it yet (app-not-ready), or the audit log could not record the request (audit-unavailable). Retry shortly.
errorstringrequiredA message for people. Do not parse it.
reasonstringrequiredhost-unavailableerrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredapp-not-readyerrorstringrequiredA message for people. Do not parse it.
reasonstringrequiredaudit-unavailable