# Supabase

Supabase emits logs from your Postgres database, PostgREST, Auth, Storage, Realtime, and Edge Functions. Dstl8 receives them as a single OTLP source and infers a stream per log type.

### Add a Supabase source

#### 1. Open the Add Source dialog

From Sources, click Add Source and select Supabase.

#### 2. Configure the source

Give the source a unique name. There's no other configuration on this step — Dstl8 generates an OTLP endpoint and auth token for your Supabase log drain to send data to.

#### 3. Create

Click Create. Dstl8 displays the values you'll need to paste into Supabase:

| Field         | Notes                                                                |
| ------------- | -------------------------------------------------------------------- |
| OTLP Endpoint | URL for the log drain, e.g. `https://<org_id>.app.dstl8.ai/src-<id>` |
| Auth Token    | Bearer token for the `Authorization` header.                         |

Keep this dialog open while you set up the destination on the Supabase side.

#### 4. Configure your Supabase log drain

In your Supabase dashboard:

1. Go to **Project Settings → Log Drains**.
2. Click **Add destination** and select **OpenTelemetry Protocol (OTLP)** as the type.
3. Give the destination a name (e.g. "Dstl8").
4. Paste the **OTLP Endpoint** from Dstl8 into the OTLP Endpoint field. The full value should look like `https://<org_id>.app.dstl8.ai/src-<id>`
5. Leave **Protocol** as `HTTP/Protobuf` and keep **Gzip Compression** enabled.
6. Under **Custom Headers**, keep the default `Content-Type: application/x-protobuf` and add a new header with name `Authorization` and value `Bearer <auth-token>` (using the Auth Token from Dstl8).
7. Save.

> Supabase OTLP log drains are a paid add-on. Check Supabase's pricing page for the current cost.

### After creating

The source appears in the list as Pending with 0 streams. Once the Supabase log drain starts forwarding events, streams are detected per log type and the source transitions to Healthy.

### Assign streams to workspaces

Streams need to be assigned to a workspace to be accessible. Open the source's actions menu (gear icon) and select Assign Streams, then check the streams you want the Default workspace (or any other workspace) to receive and Save.

See Assigning streams to workspaces for details.

### Tips

* Use a separate Supabase source per Supabase project rather than pointing multiple projects at the same endpoint, so streams don't collide.
* If logs aren't arriving, check the log drain status in Supabase's Project Settings → Log Drains for delivery errors.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.controltheory.com/controltheory-documentation/dstl8-docs/sources/supabase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
