-
Notifications
You must be signed in to change notification settings - Fork 0
Connecting Supabase
Stackwatch tracks your Supabase database size, monthly active users, storage buckets, and more. On Pro, it also monitors connections, cache hit ratio, realtime usage, edge function invocations, database egress, and gives you a per-table storage breakdown.
Two things:
- A Supabase Management API key — scoped to your account
- Your Project Reference ID — the unique ID for the specific project you want to monitor
- Go to supabase.com/dashboard/account/tokens
- Click Generate new token
- Give it a name, e.g.
stackwatch - Copy the token — it's only shown once
This is your account-level Management API key, not a project
anonorservice_rolekey. It lives under Account Settings, not inside a project.
- Open your project in the Supabase dashboard
- Go to Project Settings → General
- Copy the Reference ID — it looks like
abcdefghijklmnop(a 20-character alphanumeric string)
You can also find it in your project URL: https://supabase.com/dashboard/project/<your-ref-here>
- Navigate to your project in the Stackwatch dashboard
- Go to the project's Integrations tab
- Find Supabase and click Add account
- Paste your Management API key into the API Key field
- Paste your Project Reference ID into the Project Ref field
- Give the integration a label (e.g.
my-app-prod) - Click Connect
| Metric | Description |
|---|---|
| Database size | Total size of your PostgreSQL database vs 500 MB free limit |
| Monthly active users | Users who signed in this calendar month vs 50,000 MAU limit |
| Storage | Total storage used across all buckets vs 1 GB free limit |
| Per-bucket storage | Storage used per individual storage bucket |
| Metric | Description |
|---|---|
| Active DB connections | Current open connections vs 60 connection limit |
| Cache hit ratio | PostgreSQL buffer cache hit ratio (higher is better; shown as % of 100) |
| Per-table storage | Size of each table in your public schema |
| Realtime messages | Messages sent via Realtime this month vs 2,000,000 limit |
| Realtime peak connections | Peak concurrent Realtime connections vs limit |
| Edge function invocations | Edge function calls this month vs 500,000 limit |
| Database egress | Data egressed from the database vs limit (MB) |
Per-table storage only includes tables in your
publicschema. Supabase's internalauth,storage, andrealtimeschemas are intentionally excluded.
The token has been revoked or is incorrect. Regenerate a new one at supabase.com/dashboard/account/tokens and reconnect.
The Management API key doesn't have permission to execute queries against this project. Ensure you're using an account-level Management API key, not a project anon key or service_role key.
The Project Reference ID is wrong, or the project has been paused/deleted. Double-check the ref under Project Settings → General. Note that free-tier Supabase projects pause after a period of inactivity — you'll need to unpause the project in the Supabase dashboard first.
The integration was saved without a Project Reference ID. Delete the integration and re-add it with the correct ref.
This shouldn't happen — Stackwatch filters to the public schema only. If you're seeing auth.* entries, your integration may have been connected before a recent fix. Reconnect the integration to clear the old data.
If you have no storage buckets, storage will show as 0. The metric only appears if at least one bucket exists.
Supabase Management API tokens don't expire automatically, but you should rotate them periodically.
- Generate a new token at supabase.com/dashboard/account/tokens
- In Stackwatch, go to the project's Integrations tab, find your Supabase integration, and click the edit (pencil) icon
- Paste the new token and save
You do not need to change the Project Ref unless you're switching projects.