Skip to main content
The Supabase integration automatically instruments Supabase client instances to capture database queries, authentication operations, and errors.

Installation

1

Initialize Sentry

2

Instrument Your Supabase Client

Basic Usage

Once instrumented, all Supabase operations are automatically tracked:

Database Queries

Authentication

What Gets Captured

The integration tracks:

Database Operations

  • SELECT queries
  • INSERT operations
  • UPDATE operations
  • UPSERT operations
  • DELETE operations

Authentication Operations

  • Sign in (password, OAuth, OTP, SSO)
  • Sign up
  • Sign out
  • Reauthenticate
  • Verify OTP
  • Admin operations (create/update/delete users)

Captured Metadata

  • Operation type
  • Table name
  • Query filters
  • Database schema
  • Request body
  • HTTP status codes
  • Error details

Database Query Tracking

Database operations create spans with detailed information:

Span Attributes

Practical Examples

CRUD Operations

Complex Queries

Authentication Flows

Admin Operations

RLS (Row Level Security)

Error Tracking

Errors are automatically captured with context:

Captured Error Context

Database operations are added as breadcrumbs:

Performance Monitoring

Track database performance:

Filter Mappings

Supabase query filters are translated to readable method names:

Source Code

The Supabase integration is implemented in: packages/core/src/integrations/supabase.ts:525

Best Practices

The integration automatically filters sensitive authentication data.

1. Monitor Query Performance

2. Handle Errors Gracefully

3. Use Transactions

Troubleshooting

Integration Not Working

Ensure you’ve added the integration after creating the client:

Queries Not Tracked

Verify tracing is enabled: