Supabase
Managed Supabase observability — connect via OAuth and monitor database, Edge Functions, Auth, Storage, and Realtime automatically.
Supabase
Obtrace provides a managed Supabase agent that connects to your Supabase account via OAuth and automatically monitors all your projects. No SDK installation or code changes required.
Setup
1. Connect your Supabase account
Go to Account > Supabase in the Obtrace dashboard and click Connect Supabase. This starts an OAuth flow with the Supabase Management API.
2. Select projects to monitor
After connecting, click Discover Projects to see all Supabase projects in your organization. Enable monitoring for each project you want to observe.
3. Choose what to collect
For each monitored project, toggle the collectors you need:
| Collector | Metrics |
|---|---|
| Database | Active connections, query duration (P50/P95/P99), slow queries, lock contention, table sizes, index usage |
| Edge Functions | Invocations, errors, latency per function |
| Auth | Monthly active users, sign-ins, sign-ups |
| Storage | Total size, object count |
| Realtime | Active connections, message throughput |
4. Auto-instrumentation (optional)
Enable Auto-instrument to have Obtrace inject OBTRACE_API_KEY, OBTRACE_INGEST_URL, and OBTRACE_PROJECT_ID as secrets into your Supabase project. This lets Edge Functions that use the Obtrace SDK pick up credentials automatically without manual configuration.
How it works
The Supabase agent runs inside Obtrace infrastructure and polls the Supabase Management API on a configurable interval (default: 15s). It:
- Reads your encrypted OAuth tokens from the database
- Calls the Management API for each monitored project
- Converts responses into OTLP metrics
- Sends metrics to the Obtrace ingest pipeline
Your OAuth tokens are encrypted at rest with AES-256-GCM and automatically refreshed before expiry.
Metrics emitted
Multi-stack: React + Supabase
If your project has a React/Vite frontend and Supabase backend:
- Frontend: Use
@obtrace/browserwith a public key - Supabase: Connect via the managed agent (this page)
Each appears as a separate service in the dashboard with correlated traces.
Disconnecting
Go to Account > Supabase, click the trash icon next to a connection. All monitored projects for that connection are disabled automatically.