Supabase
Stream Supabase project logs to Sazabi for unified backend-as-a-service observability.
Stream your Supabase project logs directly to Sazabi for unified observability of your backend-as-a-service infrastructure. Monitor database queries, authentication events, Edge Functions, and real-time subscriptions.
About this data source
Supabase supports OpenTelemetry Protocol (OTLP) log drains that can forward logs to external services. By configuring a log drain pointing to Sazabi, you can:
- Monitor database query performance and connection patterns
- Track authentication events and detect anomalies
- Observe Edge Function executions and errors
- Analyze real-time subscription activity
- Use AI to investigate issues across all Supabase services
Prerequisites
Before you begin, make sure you have:
- A Supabase project on a Team or Enterprise plan
- A Sazabi public API key (project-scoped)
Log Drains require a Supabase Team or Enterprise plan. You can upgrade your project plan in the Supabase dashboard under Project Settings > Billing.
Get your API key
Create a public key
Click Create API key and select Public as the key type. Public keys are safe to use in log drain configurations and are scoped to a single project.
Copy the key and store it securely. You will not be able to see it again.
Setup
Open Supabase Log Drains
Navigate to your Supabase project dashboard and go to Project Settings > Log Drains.
Add a new destination
Click Add destination and select OpenTelemetry Protocol (OTLP) as the destination type.
Configure the endpoint
Enter the following values:
- Endpoint:
https://supabase.<region>.intake.sazabi.com - Protocol:
HTTP/Protobuf - Compression: Enable gzip
Replace <region> with your Sazabi project region (e.g., us-east-1).
Add authorization header
Add a custom header for authentication:
- Header Name:
Authorization - Header Value:
Bearer <your-api-key>
Replace <your-api-key> with your Sazabi public API key.
Select log sources
Choose which log sources to forward to Sazabi:
- Database: PostgreSQL query logs and connection events
- Auth: Authentication events and user activity
- Storage: File upload and access logs
- Edge Functions: Function execution logs and errors
Select all sources for comprehensive observability, or choose specific sources based on your monitoring needs.
Save configuration
Save your log drain configuration. Logs will start flowing to Sazabi within a few minutes.
Log types
Supabase log drains can forward the following log types:
- Database logs: PostgreSQL query execution, connections, and errors
- Auth logs: Sign-ups, logins, token refreshes, and auth errors
- Storage logs: File uploads, downloads, and access events
- Edge Function logs: Function invocations, console output, and errors
- Realtime logs: WebSocket connections and subscription activity
All log types are automatically tagged in Sazabi, allowing you to filter and search by source.
Verifying logs are flowing
Once configured, verify that logs are flowing to Sazabi:
-
Generate activity: Perform actions in your Supabase project such as running a database query, triggering an auth event, or invoking an Edge Function.
-
Ask the assistant: Open a thread in Sazabi and ask "Show me recent Supabase logs" or "What database queries ran in the last hour?"
Troubleshooting
Logs not appearing in Sazabi
- Verify the log drain is active in your Supabase project settings
- Check that the endpoint URL includes the correct region
- Ensure the Authorization header value starts with
Bearer - Generate some activity in your Supabase project to trigger logs
401 Unauthorized errors
- Your API key may be invalid or expired
- Create a new public API key in Settings > API Keys
- Verify the key is for the correct Sazabi project
Log Drains not available
Log Drains require a Supabase Team or Enterprise plan. Upgrade your project in Project Settings > Billing to enable this feature.
Missing log sources
Not all log sources may be enabled by default. Return to your log drain configuration and verify the desired sources are selected.