Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: log drains documentation (#26370)

Ziinc200481b7a035
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 05fa4fce8cc..b9a6ab8060e 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -1697,6 +1697,7 @@ export const platform: NavMenuConstant = {
url: undefined,
items: [
{ name: 'Logging', url: '/guides/platform/logs' },
+ { name: 'Log Drains', url: '/guides/platform/log-drains' },
{ name: 'Metrics', url: '/guides/platform/metrics' },
{ name: 'Monitoring with Sentry', url: '/guides/platform/sentry-monitoring' },
],
diff --git a/apps/docs/content/guides/platform/log-drains.mdx b/apps/docs/content/guides/platform/log-drains.mdx
new file mode 100644
index 00000000000..f46397a793a
--- /dev/null
+++ b/apps/docs/content/guides/platform/log-drains.mdx
@@ -0,0 +1,49 @@
+---
+id: 'log-drains'
+title: 'Log Drains'
+description: 'Getting started with Supabase 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 Teams and Enterprise plans.
+
+<Admonition type="note">
+
+Log drains is in **Private Alpha**, and is not available in the dashboard yet. [Reach out to us](https://forms.supabase.com/logdrains) to get log drains enabled for your project.
+
+You can read about the initial announcement [here](https://github.com/orgs/supabase/discussions/26650).
+
+</Admonition>
+
+The following table lists the supported destinations and the required setup configuration:
+
+| Destination | Transport Method | Configuration |
+| ------------------ | ---------------- | ------------------------------------------------- |
+| Generic Webhook | HTTP | URL <br /> HTTP Version <br/> Gzip <br /> Headers |
+| Datadog | HTTP | API Key <br /> Region |
+| Elastic - Filebeat | HTTP | URL <br /> Username and Password |
+
+### Destinations And Behavior
+
+HTTP requests will be batched with a max of 250 items with at most 1 second intervals. Gzip compression will also be used if the 3rd party provider supports it.
+
+#### Generic Webhook
+
+Logs will be sent as a JSON payload. Both HTTP1 and HTTP2 are supported. A preset configuration of Headers can be supplied for all requests.
+
+Note that requests will be **unsigned**.
+
+:::note
+Unsigned webhook requests are temporary and all requests will be signed in the near future.
+:::
+
+#### Datadog
+
+Logs sent to Datadog will have the name of the log source set on the `service` field of the event.
+
+The payload message will be a stringified JSON of the raw log event, prefixed with the event timestamp.
+
+#### Elastic - Filebeat
+
+Logs will be sent to Filebeat server. See the [Filebeat documentation](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-http_endpoint.html) on how to set up the Filebeat HTTP server.
+
+The Filebeat server only handles HTTP1 requests. Basic Auth can be provided for optional user authentication.
diff --git a/apps/docs/content/guides/platform/logs.mdx b/apps/docs/content/guides/platform/logs.mdx
index 0fb33908724..5b9184ffc6b 100644
--- a/apps/docs/content/guides/platform/logs.mdx
+++ b/apps/docs/content/guides/platform/logs.mdx
@@ -285,7 +285,7 @@ from
where h.x_real_ip is not null and r.method = "GET";
```
-### Log source reference
+### Logs field reference
Refer to the full field reference for each available source below. Do note that in order to access each nested key, you would need to perform the [necessary unnesting joins](#unnesting-arrays)