logs
The logs tool shows the agent recent requests, backend console output, the app’s traffic log and a metrics summary, to find errors and test flows after a deploy.
Logs start with the first deploy. A project that was never deployed returns an empty list with a note, not an error.
logs
- Parameters:
project.type:traces(default),logs,trafficorsummary.limit: 1–200 rows, default 50.id: withtraffic, opens one request in detail.path: withtraffic, filters by part of the path.status:2xx,3xx,4xxor5xx.source:handler,upstream,mockorerror.since: the last N minutes, 1–10,080. Default 60 fortraffic, 1,440 forsummary.
- When the agent calls it: after a deploy, to see whether each flow works; when a user reports a bug; when it writes mocks from an outside system’s real responses.
Four types
traces: recent HTTP requests with status, duration and error. Cron runs show asCRON <path>.logs:console.log/console.errorlines from handlers and cron. They can lag about 10 seconds.traffic: the app’s own request log, kept for 3 months. One row per/apirequest, newest first, with the source that answered:handler(the app’s code),upstream(the outside system inapp/upstream.ts),mock(fake data),error. Passidto see one request’s headers and bodies (sensitive parts masked, up to 6 KB).summary: the app’s state oversinceminutes: total requests, 4xx and 5xx counts, p50 / p95 response time, busiest routes, most frequent errors with a sample body, and the change against the previous period. It also returnsquota: usage against the plan’s limits.
logs({ project, type: "summary" }) → any 5xx errors?
logs({ project, type: "traffic", status: "5xx" }) → which requests failed
logs({ project, type: "traffic", id: 1842 }) → that request's headers and bodiesAn unexpected throw in a handler answers 500 with { "error": "INTERNAL", "message": "Máy chủ gặp lỗi, vui lòng thử lại sau." }, without the original message or stack. The detail is in logs (a [handler error] … line).
Next steps
- Logs and traffic: the same data in the dashboard.
- Plan limits: the limits
quotacompares against. - Call outside APIs:
upstreamandmock.
Last updated