Observability
AI Prompt
Help me monitor and debug my Supabase project. Keep all access read-only. Do the following:
1. Install the Supabase CLI globally with `npm install -g supabase`.
2. Install the Supabase Plugin with `npx plugins add supabase-community/supabase-plugin`. The plugin includes the Supabase MCP server.
3. Review my project and determine whether Supabase is already initialized. If it is not initialized, run `supabase init`.
4. Read https://supabase.com/docs/guides/observability.md and follow it.
Monitor your Supabase project with the tools you already use, as a person or an agent.
1. Observe the data#
The sources you can query, and where to read them.
- Query ClickHouse logs from Studio, MCP, or the API. Filter events in the Logs UI.
Logs
- Scrape Prometheus-compatible database metrics, or chart a subset in Reports.
Metrics API
- Inspect live Postgres stats from the CLI, the SQL Editor, or MCP.
Database
- Pull security and performance findings from Studio, MCP, the CLI, or the API.
Advisors
- Studio dashboards for API, Auth, Storage, Realtime, and database signals.
Reports
2. Detect issues#
Use queries and checks against those sources to pick up health, security, performance, and usage signals.
3. Diagnose and resolve#
Use a concrete finding, symptom, or error code to identify the cause and apply a known solution.
4. Hire an agent#
Turn the checks you trust into a read-only routine in your agent harness and run it on a schedule.
- Once per dayRun all four checks — health, security, performance, and usage — in one daily pass.
Generalist
- Once per hourWatch logs for 5xx spikes and Auth failures.
Health monitor
- Once per dayReview advisor findings and authorization failures.
Security monitor
- Once per hourFind slow queries, lock waits, and missing indexes.
Performance monitor
- Once each morningTrack request growth, error rates, and approaching limits.
Capacity monitor
Export your data#
Send logs and traces to the tools you already run.