Read logs and errors after deploys
Use app_metrics, app_logs, app_errors, and deploy_status to triage failures.
Pick the right log tool
| Tool | Holds | When to read |
|---|---|---|
app_logs |
Fleet stdout/stderr, last 2000 lines. | Debug runtime behavior and server-side capture gaps. |
app_errors |
Fingerprint-grouped runtime errors. | Read after every deploy that touches server code. |
deploy_status |
Build output for one deploy. | Pass log: true; debug a failed build step. |
app_metrics |
Requests, visitors, errors, and p50/p95 latency over 24, 168, or 720 hours. | Check whether an error spike matches traffic before digging into logs. |
app_errors issues carry a source: server for fleet-log grouping,
browser for page-beacon captures (message, truncated stack, page path;
URLs are scrubbed, no IP is stored). The beacon is a same-origin script;
the proxy appends 'self' to the page’s script directive (or adds
script-src 'self' when it names none) so it runs under the app’s own CSP.
Pass source to read one side (status still filters open, resolved or
ignored). The app owner can stop the browser capture from the Console
Settings card; there is no MCP switch.
Triage in order
- Read
app_errorsafter every deploy that touches server code. - Triage
console.erroroutput over MCP when the page reports errors. - Open
app_logsfor the last 2000 lines of fleet stdout/stderr. - Open
deploy_statuswithlog: truefor build output when the failure sits in the pipeline.
Check traffic with app_metrics
app_metrics {app, hours?} reads the same request, visitor, and latency rows as the Console metrics tab: totals plus p50/p95 latency, the top 10 paths, and the 4xx/5xx split over the last 24 hours by default (168 or 720 for a wider window). Start here when errors spike — if error_rate is flat while requests climbs, the app is handling load and the issue is elsewhere. Top paths may hold visitor text, so results are untrusted. Owner and collaborators can read.
The same call carries a traffic object: script-free visitor analytics from document loads the proxy already saw (no client script, no cookies) — pageviews, visitors, and top lists of up to 10 {key, pageviews, visitors} entries each for page, referrer, utm_source, country, device and browser. Referrer (direct) means absent or same-host; page is the path only. Prefer traffic.top over top_paths when the question is who visits which page, not which route the fleet served. This is separate from the page beacon’s browser error capture: traffic never carries crash data and has no opt-out; beacon captures land in app_errors with source: browser and stop when the owner flips the Console Settings card off.
For the person-side walkthrough, see Read logs and errors.