Supabase Observability: How to Monitor Every Part of Your Project
How to
2026-11-14
9 min read
Intended first value
You leave knowing exactly which part of your Supabase project each native tool watches, what you still need for alerts and cross-project visibility, and the setup that fits your stage.
Supabase observability takes more than a database dashboard. Supabase ships solid tools for investigating a problem once you know it exists, but monitoring every part of a project means knowing which signals each tool exposes, how long that data sticks around, and where you need something else for alerting, cross-project visibility, cost tracking, and safe access for agents.
This guide maps what Supabase gives you natively, where it stops, how to pipe its metrics into an external stack, and a practical setup for each stage of a project.
Why Supabase is harder to observe than it looks
A 500 or a latency spike doesn't tell you which service failed. A slow API response could come from PostgREST, connection exhaustion in the pooler, a missing Postgres index, or an RLS policy evaluated row by row. To the user, all four look the same. Supabase's own logging announcement gives a similar example for failed Storage uploads, where the cause could be the Storage server, its dedicated connection pooler, or the database.
That ambiguity comes from the architecture. One request can cross Postgres, the Supavisor/PgBouncer pooler, Auth, PostgREST, Realtime, Storage, and Edge Functions, and each emits its own signals. Watching one layer can't explain what goes wrong in another, so real investigation depends on correlating service events with database and infrastructure conditions.
What Supabase ships natively, and what each tool covers
Logs answer “what happened to this request?” The Logs page interleaves events into one stream with filters for level, status code, method, path, and the associated auth user, and it covers the API gateway, Postgres, PostgREST, Auth, Storage, Edge Functions, Realtime, and both connection poolers. Since June 2026 logs run on ClickHouse, and you can query them with SQL from the Logs Explorer, the MCP query_logs tool, or the Management API. Retention depends on your plan, with longer windows on higher tiers, so check Supabase’s pricing page for the current numbers.
Reports show whether a service, or the machine it runs on, is under pressure. The API, Auth, Storage, and Realtime reports cover requests, egress, and response time, plus product-specific signals such as Realtime connected clients. Database Reports cover infrastructure: on Free and Pro you get memory, CPU, disk IOPS, connections, disk usage, and database size. Detailed memory commitment, swap activity, and other advanced telemetry need Team, Enterprise, or Platform, and p99 response time needs a paid plan. Reports are cloud-only.
The Metrics API lets other systems read database health. Every hosted project exposes a Prometheus-compatible endpoint with CPU, memory, disk I/O, WAL statistics, connection pool metrics, and query performance data, refreshed every minute. It uses HTTP Basic Auth with a secret API key (sb_secret_...), which replaces the deprecated service role key for this purpose. It's in beta, so metric names and labels may change, and it isn't available for self-hosted instances.
Advisors check for known structural problems. Security and Performance checks run automatically in Studio, and you can pull the same findings through supabase db advisors in the CLI, the Management API, and the MCP get_advisors tool. Typical findings include rls_disabled_in_public, unindexed_foreign_keys, and auth_rls_initplan, which flags policies that call auth.uid() once per row. A finding is a point-in-time check of the schema, so it doesn’t tell you when a query started slowing down.
Log Drains send events somewhere you can keep, search, and alert on them. Once limited to Team and Enterprise, they're now available as a Pro add-on. Destinations include Datadog, Grafana Loki, Sentry, AWS S3, Axiom, OpenTelemetry over OTLP, Last9, Syslog, and generic HTTP endpoints.
Two more pieces round this out. The Supabase AI Assistant can pull product logs, spot volume spikes, investigate a time window, and review branch diffs, with advanced debugging in feature preview. OpenTelemetry support is still in development: Supabase is adding it to core products and plans to display traces, and supabase-js already propagates W3C trace context through Supabase services.
Where the native stack runs out
Alerting. Studio and Reports show you what's happening, but they don't tell you when CPU climbs, connections near capacity, or errors spike. Supabase's Metrics API docs point to external tools for saturation, right-sizing, and index-regression alerts, and anomaly detection lives outside Supabase too. Without a detection layer, production problems tend to surface through user complaints.
Cross-project visibility. Reports and Logs are scoped to one project. Agencies, multi-tenant SaaS teams, and anyone separating staging from production don’t get a native view across projects or organizations.
Cost tracking. Reports track disk usage and database size, but nothing native ties compute, storage, and egress spend back to specific projects, branches, queries, or services.
History. Lower plans keep shorter log windows, and pg_stat_statements is a running tally with no historical snapshots. Neither that tally nor a point-in-time Advisor finding can reconstruct a past regression on its own.
Native tools are genuinely enough for many early projects. Automated detection, cross-project views, and integration with an existing APM stack need more.
Piping the Metrics API into an external observability stack
Because the Metrics API speaks Prometheus, its data isn't locked into one dashboard. Any compatible backend can scrape it for alerts, long-term history, and unified views. Scrape once a minute with authentication to match the refresh interval.
Write alert rules that separate sustained pressure from blips:
Alert on active connections approaching pool limits, and treat repeated connection spikes as a signal to tune the pooler.
Compare sustained CPU and memory use against slow query logs.
Watch disk I/O wait, which often points to missing indexes or excessive scanning.
Set an acceptable replication lag threshold if you use read replicas.
Track query performance after each deploy to catch regressions.
Supabase's MIT-licensed supabase-grafana repository gives you dashboard JSON, alert examples, and more than 200 ready-made charts to start from. Log Drains supply the matching event stream, so you can tie a connection spike to the auth event or Edge Function call behind it.
Which external tools connect to Supabase, and what each adds
Pick based on the stack you already run. Prometheus-compatible tools all share the same scrape pattern, and log-focused tools connect through Log Drains or their own application integrations. The real difference is whether you mainly need infrastructure monitoring, event analysis, or application error correlation.
Grafana Cloud suits teams that want dashboards with little operational overhead. Its managed Prometheus can scrape the Metrics API on Free and Pro projects, and you can import the Supabase dashboard JSON directly.
Datadog suits teams already on its APM. Use the Agent's OpenMetrics check or Prometheus remote write; it adds anomaly detection and accepts Log Drains, so metrics and events land in one place.
Elastic offers an agentless integration for teams already on the Elastic stack.
Axiom works well as a Log Drain destination for high-volume event analysis, such as correlating Edge Function logs with Postgres execution plans when embedding or vector queries fail.
Sentry focuses on application failures rather than infrastructure metrics. It accepts Log Drains and captures
supabase-jserrors and spans for front-end and back-end correlation.AWS Managed Prometheus fits AWS-native teams that don't want another observability vendor. Grafana Mimir and VictoriaMetrics are vendor-neutral alternatives. All of them use the same Supabase scrape.
Agentic observability: MCP-based health checks
Supabase's Observability docs describe their goal as giving "an agent repeatable checks to run," and they spell out schedules. Health checks run hourly for API and Auth server errors and connection pressure. Security checks run daily for Advisor findings and authorization failures. Performance checks run hourly for sessions, query regressions, and Advisors. Resource checks run each morning for sizes, connections, request growth, and forecasts.
The Supabase MCP server exposes get_advisors and query_logs for this. Connection settings decide how much the agent can reach: read_only drops it to a read-only Postgres user, project_ref pins it to one project, and feature groups limit which tools it sees. The safe pattern is read-only, project-scoped investigation, not write access to production. Our guide to the Supabase MCP server walks through that setup.
Scheduled checks help, but someone still has to schedule them, and a scheduled check isn't an alert. An agent can also stitch together health data from several Supabase projects, which Studio can't show in one place, but every run rediscovers the same queries unless the numbers come from a governed data layer.
Why agents querying production observability data without limits is a real risk
In one documented demonstration, an agent connected with service_role ran two SQL queries: the first read the full contents of an integration_tokens table, and the second inserted the results into a ticket thread. Both bypassed RLS, and both looked like ordinary tool calls unless someone expanded them.
The credential is the problem. service_role bypasses RLS by design and grants unrestricted read and write access, so prompt injection can turn an otherwise valid tool call into a data leak. A monitoring purpose doesn't limit what the key can do.
The fix is architectural: keep raw production data out of reach of agents that read untrusted content. Read-only credentials, project-scoped connections, restricted tool groups, and pre-modeled datasets each cover part of that boundary. Note that read-only access stops writes but not sensitive reads.
Where Dreambase fits
Dreambase Observability is built for the gaps above. It connects to your Supabase organizations and gives you one view of health, capacity, usage, and spend across every organization, project, branch, and replica, so you can see which project is driving cost and where you can improve performance or cut spend. Alerts reach your team in Slack or email, or any system you choose through a webhook. With Triggers, you or your agent can define custom alerts on any observability signal or metric through the Dreambase MCP server, and alert events reach your agents the same way, so Claude, ChatGPT, or your own agent can start investigating as soon as something goes sideways.
Agents work from Dreambase's governed copy of your Supabase metrics rather than raw production tables, which means you never hand them a production service_role key. When you're ready to go deeper into product and revenue analytics on the same foundation, meet with the team.
To try it on your own projects, start for free or run a one-off Supabase database health check.
A practical Supabase observability setup by stage
Prototype (Free). Use Logs and Reports for CPU, memory, connections, and error investigation. Run the Security and Performance Advisors before launch to catch rls_disabled_in_public and unindexed_foreign_keys. You don't need Log Drains or an external scraper yet.
Production launch (Pro). Add Log Drains for database errors, auth patterns, and incident investigation; the Pro add-on is billed per drain per project, plus usage. Scrape the Metrics API into Grafana Cloud (its free tier works) or your existing APM, with alerts for connection saturation, CPU pressure, and query regressions, or connect Dreambase Observability to get health, alerts, and spend without building dashboards. For AI-heavy apps, send logs to Axiom or Datadog to correlate Edge Function failures with Postgres execution plans. Start MCP health checks with read-only, project-scoped credentials, using Supabase's four schedules as templates.
Scale (Team or Enterprise). Use the longer log retention of the higher plans when on-call work needs longer lookbacks, and cross-reference advanced Reports telemetry like memory commitment and swap activity with Metrics API data as compute grows. This is where cross-project views and cost attribution stop being nice to have, and where a shared, governed layer keeps humans and agents working from the same numbers.
Detection and access boundaries belong in production from day one, even if the cross-project layer only becomes necessary at scale.
NEXT STEP
How to improve your Supabase database health with MCP
Turn these checks into a health report your agent can run on any Supabase project.