Browse documentation

Source: apps/studio/src/features/logs. Routes: /p/:id/logs, /p/:id/advisor, and /p/:id/observability/*.

Calls

ScreenEndpoint
LogsGET /admin/logs?limit=…
Observability · APIGET /admin/shield → ShieldReport
Observability · DatabaseGET /admin/performance → PerformanceReport
Observability · OverviewGET /admin/metrics/timeseries?range=…, GET /admin/stats
AdvisorAdvisor findings from the admin observability controller

GET /admin/logs reads the in-memory ring buffer (CONSOLE_LOG_BUFFER_SIZE, default 500). Sources you will see: http, sql, edge, job, webhook, auth, storage, shield, realtime, events, console, audit.

Note

Requests to /api/admin/*, /api/health-check, /studio and /console are deliberately excluded from the http source, so the Logs screen shows your users' traffic rather than your own Studio browsing. Background work appears via logActivity, which is why a backup that never ran is visible as an absence you can actually detect.

Log history

How far back the Logs screen can look is the logs.retention group, edited from the Logs screen's own retention panel and nowhere else: lines are stored in platform.request_logs and pruned by the data-retention job.

Shield report

Derived from lib/shield-telemetry.ts: per-route count, errors, slow (> 1000 ms), avgMs, p95Ms; rate-limit hits with their scope and bucket key; and abuse candidates ranked by requests, errors and rate-limit hits with their top path. Traffic is classified by path into auth, rest, edge, files or api.

Performance

GET /admin/performance reports database-side performance. The screen offers to install pg_stat_statements when it is missing:

POST /admin/schema/extensions/pg_stat_statements

Metric series

GET /admin/metrics/timeseries?range=… returns samples of { at, rps, p95, errorRate, memMb, reqs }, taken every 10 s and kept for roughly an hour (360 samples). History is in-memory and resets on restart — by design, there is no metrics store to operate.

Advisor

Security and performance findings computed by catalogue queries: tables open over REST, RLS on with no policy, policies depending on unprotected tables, sensitive columns publicly readable, unauthenticated writes, SECURITY DEFINER functions callable by anon, unindexed policy filters, missing primary keys, unindexed foreign keys, unused indexes, tables needing vacuum.

Each finding has a category (security / performance) and a level (critical / warning / info). Full list and semantics: Observability.