Log Drains
Log drains will send all logs of the Supabase stack to one or more desired destinations. It is only available for customers on Team and Enterprise Plans. Log drains is available in the dashboard under Project Settings > Log Drains.
You can read about the initial announcement here and vote for your preferred drains in this discussion.
Supported destinations
The following table lists the supported destinations and the required setup configuration:
Destination | Transport Method | Configuration |
---|---|---|
Generic HTTP endpoint | HTTP | URL HTTP Version Gzip Headers |
DataDog | HTTP | API Key Region |
Loki | HTTP | URL Headers |
HTTP requests are batched with a max of 250 logs or 1 second intervals, whichever happens first. Logs are compressed via Gzip if the destination supports it.
Generic HTTP endpoint
Logs are sent as a POST request with a JSON body. Both HTTP/1 and HTTP/2 protocols are supported. Custom headers can optionally be configured for all requests.
Note that requests are unsigned.
Unsigned requests to HTTP endpoints are temporary and all requests will signed in the near future.
DataDog logs
Logs sent to DataDog have the name of the log source set on the service
field of the event and the source set to Supabase
. Logs are gzipped before they are sent to DataDog.
The payload message is a JSON string of the raw log event, prefixed with the event timestamp.
To setup DataDog log drain, generate a DataDog API key here and the location of your DataDog site.
If you are interested in other log drains, upvote them here
Loki
Logs sent to the Loki HTTP API are specifically formatted according to the HTTP API requirements. See the official Loki HTTP API documentation for more details.
Events are batched with a maximum of 250 events per request.
The log source and product name will be used as stream labels.
The event_message
and timestamp
fields will be dropped from the events to avoid duplicate data.
Loki must be configured to accept structured metadata, and it is advised to increase the default maximum number of structured metadata fields to at least 500 to accommodate large log event payloads of different products.
Pricing
For a detailed breakdown of how charges are calculated, refer to Manage Log Drain usage.