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:

CollectorMetrics
DatabaseActive connections, query duration (P50/P95/P99), slow queries, lock contention, table sizes, index usage
Edge FunctionsInvocations, errors, latency per function
AuthMonthly active users, sign-ins, sign-ups
StorageTotal size, object count
RealtimeActive 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:

  1. Reads your encrypted OAuth tokens from the database
  2. Calls the Management API for each monitored project
  3. Converts responses into OTLP metrics
  4. 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

supabase.project.health          — 1/0 gauge per project
db.postgres.*                    — same metric names as DB Agent for dashboard compatibility
supabase.edge_function.invocations
supabase.edge_function.errors
supabase.edge_function.latency_ms
supabase.auth.monthly_active_users
supabase.auth.signins
supabase.auth.signups
supabase.storage.size_bytes
supabase.storage.object_count
supabase.realtime.connections
supabase.realtime.messages

Multi-stack: React + Supabase

If your project has a React/Vite frontend and Supabase backend:

  1. Frontend: Use @obtrace/browser with a public key
  2. 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.

Nesta página