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): overhaul page style and add missing Last9 + Syslog … (#48140)

Steven Eubank751dcecf8656
diff --git a/apps/docs/components/ContentListings/ContentListings.client.tsx b/apps/docs/components/ContentListings/ContentListings.client.tsx
index f8b3d4ee310..956220b94bf 100644
--- a/apps/docs/components/ContentListings/ContentListings.client.tsx
+++ b/apps/docs/components/ContentListings/ContentListings.client.tsx
@@ -13,6 +13,8 @@ import { Badge } from 'ui'
import { GlassPanel } from 'ui-patterns/GlassPanel'
import { Heading } from 'ui/src/components/CustomHTMLElements'
+import { resolveContentListingIcon } from './iconChip'
+
const GRID_ITEM_CLASS = {
2: 'col-span-12 md:col-span-6',
3: 'col-span-12 md:col-span-4',
@@ -77,8 +79,8 @@ function ContentListingsGroup({ group }: { group: ContentListingGroup }) {
>
<GlassPanel
title={item.title}
- icon={item.icon}
- hasLightIcon={item.hasLightIcon ?? Boolean(item.icon)}
+ icon={resolveContentListingIcon(item.icon)}
+ hasLightIcon={item.hasLightIcon ?? typeof item.icon === 'string'}
badge={item.badge ? <Badge variant="success">{item.badge}</Badge> : undefined}
>
{item.description}
diff --git a/apps/docs/components/ContentListings/iconChip.tsx b/apps/docs/components/ContentListings/iconChip.tsx
new file mode 100644
index 00000000000..8fe440b18bf
--- /dev/null
+++ b/apps/docs/components/ContentListings/iconChip.tsx
@@ -0,0 +1,37 @@
+'use client'
+
+import { Axiom, Datadog, Grafana, Last9, Otlp, Sentry } from 'icons'
+import { Braces, Cloud, Server } from 'lucide-react'
+import type { ReactNode } from 'react'
+
+import type { ContentListingIcon } from '~/lib/content-listings.schema'
+
+type IconKind = Extract<ContentListingIcon, { kind: string }>['kind']
+
+const ICON_KIND_COMPONENTS: Record<IconKind, ReactNode> = {
+ braces: <Braces className="h-5 w-5" strokeWidth={1.5} />,
+ otlp: <Otlp className="h-5 w-5" />,
+ datadog: <Datadog className="h-5 w-5" />,
+ grafana: <Grafana className="h-5 w-5" />,
+ cloud: <Cloud className="h-5 w-5" strokeWidth={1.5} />,
+ sentry: <Sentry className="h-5 w-5" />,
+ axiom: <Axiom className="h-5 w-5" />,
+ last9: <Last9 className="h-5 w-5" />,
+ server: <Server className="h-5 w-5" strokeWidth={1.5} />,
+}
+
+export function resolveContentListingIcon(
+ icon: ContentListingIcon | undefined
+): ReactNode | string | undefined {
+ if (icon && typeof icon === 'object') {
+ return (
+ <span
+ className="flex h-10 w-10 items-center justify-center rounded-full text-base font-semibold"
+ style={{ color: icon.color, backgroundColor: icon.bg }}
+ >
+ {ICON_KIND_COMPONENTS[icon.kind]}
+ </span>
+ )
+ }
+ return icon
+}
diff --git a/apps/docs/content/guides/telemetry/log-drains.mdx b/apps/docs/content/guides/telemetry/log-drains.mdx
index f1f5f8d54e7..3934c7b5d7d 100644
--- a/apps/docs/content/guides/telemetry/log-drains.mdx
+++ b/apps/docs/content/guides/telemetry/log-drains.mdx
@@ -6,60 +6,50 @@ description: 'Getting started with Supabase Log Drains'
Log drains send all logs of the Supabase stack to one or more desired destinations. It is only available for customers on Pro, Team and Enterprise Plans. Log drains are available in the dashboard under [Project Settings > Log Drains](/dashboard/project/_/settings/log-drains).
-You can read about the initial announcement [here](/blog/log-drains) and vote for your preferred drains in [this discussion](https://github.com/orgs/supabase/discussions/28324?sort=top).
+## What you can do with log drains
-## Supported destinations
+- Route Supabase logs (Postgres, Auth, Storage, Edge Functions, and more) to any observability platform.
+- Combine Supabase logs with application-level traces — see [Tracing with the JS SDK](/docs/guides/telemetry/client-side-tracing) to extend your traces into Supabase.
+- Archive logs to S3 for long-term retention and compliance.
+- Build alerts and dashboards on top of Supabase log data in your preferred vendor.
-The following table lists the supported destinations and the required setup configuration:
+<ContentListings id="log-drains-destinations" />
-| Destination | Transport Method | Configuration |
-| --------------------- | ---------------- | -------------------------------------------------------------------------------------- |
-| Generic HTTP endpoint | HTTP | URL <br /> HTTP Version <br/> Gzip <br /> Headers |
-| Datadog | HTTP | API Key <br /> Region |
-| Loki | HTTP | URL <br /> Headers |
-| Sentry | HTTP | DSN |
-| Amazon S3 | AWS SDK | S3 Bucket <br/> Region <br/> Access Key ID <br/> Secret Access Key <br/> Batch Timeout |
-| OTLP | HTTP | Endpoint <br /> Protocol <br/> Gzip <br /> Headers |
+HTTP destinations receive logs as batched POST requests with a maximum of 250 events or 1-second intervals, whichever comes first.
-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.
+## Custom endpoint
-### Generic HTTP endpoint
+Logs are delivered as a JSON array via HTTP POST. Both HTTP/1 and HTTP/2 are supported. Custom headers can be added to every request for authentication or routing.
-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.
+**Required configuration:**
-Note that requests are **unsigned**.
+- URL — your endpoint URL (`http://` or `https://`)
+- HTTP Version — `HTTP/1` or `HTTP/2`
+- Gzip — enable to compress the payload before sending
+- Headers — optional key/value pairs added to every request
<Admonition type="note">
-Unsigned requests to HTTP endpoints are temporary and all requests will signed in the near future.
+Requests to custom endpoints are currently unsigned. Signed requests are coming in a future release.
</Admonition>
-<Accordion
- type="default"
->
- <AccordionItem
- header="Edge Function Walkthrough (Uncompressed)"
- id="uncompressed"
- >
+<Accordion type="default">
+ <AccordionItem header="Edge Function walkthrough (uncompressed)" id="uncompressed">
-1. Create and deploy the edge function
-
-Generate a new edge function template and update it to log out the received JSON payload. For simplicity, we will accept any request with a Publishable Key.
+1. Create and deploy an Edge Function to receive the drain:
```bash
-supabase functions new hello-world
+supabase functions new log-receiver
```
-You can use this example snippet as an illustration of how the received request will be like.
+Update the function body to log the incoming payload:
```ts
import 'npm:@supabase/functions-js/edge-runtime.d.ts'
Deno.serve(async (req) => {
const data = await req.json()
-
console.log(`Received ${data.length} logs, first log:\n ${JSON.stringify(data[0])}`)
return new Response(JSON.stringify({ message: 'ok' }), {
headers: { 'Content-Type': 'application/json' },
@@ -67,65 +57,48 @@ Deno.serve(async (req) => {
})
```
-And then deploy it with:
+Deploy it:
```bash
-supabase functions deploy hello-world --project-ref [PROJECT REF]
+supabase functions deploy log-receiver --project-ref [PROJECT REF]
```
<Admonition type="caution">
-This will create an infinite loop, as we are generating an additional log event that will eventually trigger a new request to this edge function. However, due to the batching nature of how Log Drain events are dispatched, the rate of edge function triggers will not increase greatly and will have an upper bound.
+Deploying an Edge Function as a log drain target will create a feedback loop — each drain event generates a new Edge Function log, which triggers another drain event. The batching behavior limits how fast this escalates, but it will run continuously.
</Admonition>
-2. Configure the HTTP Drain
-
-Create an HTTP drain under the [Project Settings > Log Drains](/dashboard/project/_/settings/log-drains).
+2. Create the drain in [Project Settings > Log Drains](/dashboard/project/_/settings/log-drains):
-- Disable the Gzip, as we want to receive the payload without compression.
-- Under URL, set it to your edge function URL `https://[PROJECT REF].supabase.co/functions/v1/hello-world`
-- Under Headers, set the `Authorization: Bearer [PUBLISHABLE KEY]`
+- Disable Gzip.
+- Set the URL to `https://[PROJECT REF].supabase.co/functions/v1/log-receiver`.
+- Add the header `Authorization: Bearer [PUBLISHABLE KEY]`.
<ProjectConfigVariables variable="publishable" />
- </AccordionItem>
+ </AccordionItem>
- <AccordionItem
- header="Edge Function Gzip Example"
- id="gzip"
- >
+ <AccordionItem header="Edge Function walkthrough (Gzip)" id="gzip">
-Gzip payloads can be decompressed using native in-built APIs. Refer to the Edge Function [compression guide](/docs/guides/functions/compression)
+Gzip payloads can be decompressed using Node-compatible built-in APIs. See the Edge Function [compression guide](/docs/guides/functions/compression) for more details.
```ts
import { gunzipSync } from 'node:zlib'
Deno.serve(async (req) => {
try {
- // Check if the request body is gzip compressed
const contentEncoding = req.headers.get('content-encoding')
if (contentEncoding !== 'gzip') {
- return new Response('Request body is not gzip compressed', {
- status: 400,
- })
+ return new Response('Request body is not gzip compressed', { status: 400 })
}
- // Read the compressed body
const compressedBody = await req.arrayBuffer()
-
- // Decompress the body
const decompressedBody = gunzipSync(new Uint8Array(compressedBody))
-
- // Convert the decompressed body to a string
- const decompressedString = new TextDecoder().decode(decompressedBody)
- const data = JSON.parse(decompressedString)
- // Process the decompressed body as needed
+ const data = JSON.parse(new TextDecoder().decode(decompressedBody))
console.log(`Received: ${data.length} logs.`)
- return new Response('ok', {
- headers: { 'Content-Type': 'text/plain' },
- })
+ return new Response('ok', { headers: { 'Content-Type': 'text/plain' } })
} catch (error) {
console.error('Error:', error)
return new Response('Error processing request', { status: 500 })
@@ -133,222 +106,234 @@ Deno.serve(async (req) => {
})
```
- </AccordionItem>
-
+ </AccordionItem>
</Accordion>
-### Datadog logs
+## OpenTelemetry (OTLP)
-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.
+Logs are sent to any OTLP-compatible endpoint using the OpenTelemetry Protocol over HTTP with Protocol Buffers encoding, following the [OpenTelemetry Logs specification](https://opentelemetry.io/docs/specs/otel/logs/).
-The payload message is a JSON string of the raw log event, prefixed with the event timestamp.
+**Required configuration:**
-To setup Datadog log drain, generate a Datadog API key [here](https://app.datadoghq.com/organization-settings/api-keys) and the location of your Datadog site.
+- Endpoint — full URL of your OTLP HTTP endpoint (typically ends in `/v1/logs`)
+- Protocol — `http/protobuf` (the only supported protocol)
+- Gzip — enable to reduce bandwidth (recommended)
+- Headers — optional authentication headers
-<Accordion
- type="default"
->
- <AccordionItem
- header="Walkthrough"
- id="walkthrough"
- >
+<Admonition type="note">
- 1. Generate API Key in [Datadog dashboard](https://app.datadoghq.com/organization-settings/api-keys)
- 2. Create log drain in [Supabase dashboard](/dashboard/project/_/settings/log-drains)
- 3. Watch for events in the [Datadog Logs page](https://app.datadoghq.com/logs)
+Your OTLP endpoint must accept logs at the `/v1/logs` path with `application/x-protobuf` content type.
- </AccordionItem>
+</Admonition>
- <AccordionItem
- header="Example destination configuration"
- id="cfg"
- >
+Compatible platforms include OpenTelemetry Collector, Grafana Cloud, New Relic, Honeycomb, Datadog (OTLP ingestion), Elastic, and any other OTLP-compatible observability tool.
- [Grok parser](https://docs.datadoghq.com/service_management/events/pipelines_and_processors/grok_parser?tab=matchers) matcher for extracting the timestamp to a `date` field
- ```
- %{date("yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZ"):date}
- ```
+<Accordion type="default">
+ <AccordionItem header="OpenTelemetry Collector example" id="otel-collector">
- [Grok parser](https://docs.datadoghq.com/service_management/events/pipelines_and_processors/grok_parser?tab=matchers) matcher for converting stringified JSON to structured JSON on the `json` field.
- ```
- %{data::json}
- ```
+Configure an OTLP HTTP receiver in your Collector config:
- [Remapper](https://docs.datadoghq.com/service_management/events/pipelines_and_processors/remapper) for setting the log level.
- ```
- metadata.parsed.error_severity, metadata.level
- ```
+```yaml
+receivers:
+ otlp:
+ protocols:
+ http:
+ endpoint: 0.0.0.0:4318
- </AccordionItem>
+processors:
+ batch:
-</Accordion>
+exporters:
+ logging:
+ loglevel: debug
-If you are interested in other log drains, upvote them [here](https://github.com/orgs/supabase/discussions/28324)
+service:
+ pipelines:
+ logs:
+ receivers: [otlp]
+ processors: [batch]
+ exporters: [logging]
+```
-### Loki
+Then create a log drain in [Project Settings > Log Drains](/dashboard/project/_/settings/log-drains) with the endpoint set to `https://your-collector:4318/v1/logs`.
-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](https://grafana.com/docs/loki/latest/reference/loki-http-api/#ingest-logs).
+ </AccordionItem>
-Events are batched with a maximum of 250 events per request.
+ <AccordionItem header="Authentication examples" id="otlp-auth">
-The log source and product name will be used as stream labels.
+Different OTLP platforms use different authentication methods. Add the appropriate header to your drain configuration:
-The `event_message` and `timestamp` fields will be dropped from the events to avoid duplicate data.
+**API Key:**
-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.
+```
+X-API-Key: your-api-key
+```
-### Sentry
+**Bearer Token:**
-Logs are sent to Sentry as part of [Sentry's Logging Product](https://docs.sentry.io/product/explore/logs/). Ingesting Supabase logs as Sentry errors is currently not supported.
+```
+Authorization: Bearer your-token
+```
-To setup the Sentry log drain, you need to do the following:
+**Basic Auth:**
-1. Grab your DSN from your [Sentry project settings](https://docs.sentry.io/concepts/key-terms/dsn-explainer/). It should be of the format `{PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}{PATH}/{PROJECT_ID}`.
-2. Create log drain in [Supabase dashboard](/dashboard/project/_/settings/log-drains)
-3. Watch for events in the [Sentry Logs page](https://sentry.io/explore/logs/)
+```
+Authorization: Basic base64(username:password)
+```
+
+ </AccordionItem>
+</Accordion>
-All fields from the log event are attached as attributes to the Sentry log, which can be used for filtering and grouping in the Sentry UI. There are no limits to cardinality or the number of attributes that can be attached to a log.
+## Datadog
-If you are self-hosting Sentry, Sentry Logs are only supported in self-hosted version [25.9.0](https://github.com/getsentry/self-hosted/releases/tag/25.9.0) and later.
+Logs are batched and sent to Datadog with Gzip compression. Each event's log source is mapped to the `service` field, and the source is set to `Supabase`. The payload message is a JSON string of the raw log event, prefixed with the event timestamp.
-### Axiom
+**Required configuration:**
-Logs sent to a specified Axiom's dataset as JSON of a raw log event,
-with timestamp modified to be parsed by ingestion endpoint.
+- API Key — from [Datadog Organization Settings](https://app.datadoghq.com/organization-settings/api-keys)
+- Region — the Datadog site your account uses (US1, US3, US5, EU, AP1, AP2, US1-FED)
-To set up the Axiom log drain, you have to:
+**Steps:**
-1. Create a dataset for ingestion in Axiom Console -> Datasets
-2. Generate an Axiom API Token with permission to ingest into the created dataset (see [Axiom docs](https://axiom.co/docs/reference/tokens#create-basic-api-token))
-3. Create log drain in [Supabase dashboard](/dashboard/project/_/settings/log-drains), providing:
- - Name of the dataset
- - API token
-4. Watch for events in the Stream panel of Axiom Console
+1. Generate an API key in the [Datadog dashboard](https://app.datadoghq.com/organization-settings/api-keys).
+2. Create the drain in [Project Settings > Log Drains](/dashboard/project/_/settings/log-drains).
+3. Watch incoming events on the [Datadog Logs page](https://app.datadoghq.com/logs).
-### Amazon S3
+<Accordion type="default">
+ <AccordionItem header="Parsing and pipeline configuration" id="datadog-pipeline">
-Logs are written to an existing S3 bucket that you own.
+[Grok parser](https://docs.datadoghq.com/service_management/events/pipelines_and_processors/grok_parser?tab=matchers) — extract the timestamp into a `date` field:
-Required configuration when creating an S3 Log Drain:
+```
+%{date("yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZ"):date}
+```
-- S3 Bucket: the name of an existing S3 bucket.
-- Region: the AWS region where the bucket is located.
-- Access Key ID: used for authentication.
-- Secret Access Key: used for authentication.
-- Batch Timeout (ms): maximum time to wait before flushing a batch. Recommended 2000-5000ms.
+[Grok parser](https://docs.datadoghq.com/service_management/events/pipelines_and_processors/grok_parser?tab=matchers) — convert stringified JSON to structured JSON on the `json` field:
+
+```
+%{data::json}
+```
+
+[Remapper](https://docs.datadoghq.com/service_management/events/pipelines_and_processors/remapper) — set the log level:
+
+```
+metadata.parsed.error_severity, metadata.level
+```
+
+ </AccordionItem>
+</Accordion>
+
+## Loki
+
+Logs are formatted and sent to the Loki HTTP push API. The log source and product name are used as stream labels. The `event_message` and `timestamp` fields are dropped from events to avoid duplicate data. Events are batched with a maximum of 250 events per request.
+
+**Required configuration:**
+
+- URL — your Loki push endpoint (e.g. `https://my-logs.grafana.net/loki/api/v1/push`)
+- Username — optional, required for Grafana Cloud and other authenticated Loki instances
+- Password — optional, required for Grafana Cloud and other authenticated Loki instances
+- Headers — optional additional headers
<Admonition type="note">
-Ensure the AWS account tied to the Access Key ID has permissions to write to the specified S3 bucket.
+Loki must be configured to accept **structured metadata**. Increase the default maximum number of structured metadata fields to at least 500 to accommodate large log event payloads across different Supabase products.
</Admonition>
-### OpenTelemetry protocol (OTLP)
+See the official [Loki HTTP API documentation](https://grafana.com/docs/loki/latest/reference/loki-http-api/#ingest-logs) for more details on the push API format.
+
+## Amazon S3
+
+Logs are written as batched files to an existing S3 bucket that you own.
-Logs are sent to any OTLP-compatible endpoint using the OpenTelemetry Protocol over HTTP with Protocol Buffers encoding.
+**Required configuration:**
-OTLP is an open-standard protocol for telemetry data, making it compatible with many observability platforms including:
+- S3 Bucket — name of an existing S3 bucket
+- Region — AWS region where the bucket is located
+- Access Key ID — used for authentication
+- Secret Access Key — used for authentication
+- Batch Timeout (ms) — maximum wait before flushing a batch (recommended: 2000–5000ms)
-<ul>
- <li>OpenTelemetry Collector</li>
- <li>Grafana Cloud</li>
- <li>New Relic</li>
- <li>Honeycomb</li>
- <li>Datadog (OTLP ingestion)</li>
- <li>Elastic</li>
- <li>And many more</li>
-</ul>
+<Admonition type="note">
+
+The AWS account tied to the Access Key ID must have write permissions on the specified S3 bucket.
-Required configuration when creating an OTLP Log Drain:
+</Admonition>
-<ul>
- <li>Endpoint: The full URL of your OTLP HTTP endpoint (typically ending in `/v1/logs`)</li>
- <li>Protocol: Currently only `http/protobuf` is supported</li>
- <li>Gzip: Enable compression to reduce bandwidth (recommended: enabled)</li>
- <li>Headers: Optional authentication headers (e.g., `Authorization`, `X-API-Key`)</li>
-</ul>
+## Sentry
-Logs are sent as OTLP log record messages using Protocol Buffers encoding, following the [OpenTelemetry Logs specification](https://opentelemetry.io/docs/specs/otel/logs/).
+Logs are sent to [Sentry's Logging product](https://docs.sentry.io/product/explore/logs/). All log event fields are attached as Sentry log attributes, which can be used for filtering and grouping. There are no cardinality limits on the number of attributes.
+
+**Required configuration:**
+
+- DSN — your Sentry project DSN in the format `{PROTOCOL}://{PUBLIC_KEY}@{HOST}/{PROJECT_ID}`
+
+**Steps:**
+
+1. Get your DSN from [Sentry project settings](https://docs.sentry.io/concepts/key-terms/dsn-explainer/).
+2. Create the drain in [Project Settings > Log Drains](/dashboard/project/_/settings/log-drains).
+3. Watch incoming logs on the [Sentry Logs page](https://sentry.io/explore/logs/).
<Admonition type="note">
-Ensure your OTLP endpoint is configured to accept logs at the `/v1/logs` path with `application/x-protobuf` content type.
+Ingesting Supabase logs as Sentry _errors_ is not supported. If you are self-hosting Sentry, Sentry Logs requires self-hosted version [25.9.0](https://github.com/getsentry/self-hosted/releases/tag/25.9.0) or later.
</Admonition>
-<Accordion
- type="default"
->
- <AccordionItem
- header="OpenTelemetry Collector Example"
- id="otel-collector"
- >
-
-To receive Supabase logs with the OpenTelemetry Collector, configure an OTLP HTTP receiver:
+## Axiom
-```yaml
-receivers:
- otlp:
- protocols:
- http:
- endpoint: 0.0.0.0:4318
+Logs are sent to an Axiom dataset as JSON, with the timestamp adjusted for Axiom's ingestion format.
-processors:
- batch:
+**Required configuration:**
-exporters:
- logging:
- loglevel: debug
+- Dataset Name — name of the target dataset in Axiom
+- API Token — an Axiom API token with ingest permissions on the dataset
-service:
- pipelines:
- logs:
- receivers: [otlp]
- processors: [batch]
- exporters: [logging]
-```
+**Steps:**
-Then create a log drain in [Supabase dashboard](/dashboard/project/_/settings/log-drains) with:
+1. Create a dataset in Axiom Console under **Datasets**.
+2. Generate an API token with ingest access (see [Axiom token docs](https://axiom.co/docs/reference/tokens#create-basic-api-token)).
+3. Create the drain in [Project Settings > Log Drains](/dashboard/project/_/settings/log-drains).
+4. Watch incoming events in the Axiom Console **Stream** panel.
-<ul>
- <li>Endpoint: `https://your-collector:4318/v1/logs`</li>
- <li>Add authentication headers as needed for your setup</li>
-</ul>
+## Last9
- </AccordionItem>
+Logs are sent to Last9 using its OpenTelemetry-native ingestion endpoint. Credentials are obtained from the Last9 OTEL integration panel.
- <AccordionItem
- header="Authentication Examples"
- id="auth"
+**Required configuration:**
->
+- Region — your Last9 cluster region (US West 1 or AP South 1)
+- Username — from the Last9 OTEL integration panel
+- Password — from the Last9 OTEL integration panel
-Different OTLP platforms use different authentication methods. Add headers accordingly:
+**Steps:**
-**API Key Authentication:**
+1. In the Last9 dashboard, open the OTEL integration panel and note your region, username, and password.
+2. Create the drain in [Project Settings > Log Drains](/dashboard/project/_/settings/log-drains).
-```
-X-API-Key: your-api-key
-```
+## Syslog
-**Bearer Token:**
+Logs are forwarded to a remote Syslog receiver using TCP or TLS, adhering to [RFC 5424](https://datatracker.ietf.org/doc/html/rfc5424).
-```
-Authorization: Bearer your-token
-```
+**Required configuration:**
-**Basic Authentication:**
+- Host — hostname or IP address of the Syslog receiver
+- Port — port of the Syslog receiver (0–65535)
+- TLS — enable to connect via SSL/TLS instead of plain TCP
-```
-Authorization: Basic base64(username:password)
-```
+**Optional configuration:**
-Refer to your observability platform's documentation for specific authentication requirements.
+- Structured Data — static RFC 5424 structured data included in every log frame (e.g. `[exampleSDID@32473 iut="3"]`)
+- Cipher Key — base64-encoded 32-byte key for AES-256-GCM encryption of the log body
- </AccordionItem>
+**TLS-only options:**
-</Accordion>
+- CA Certificate — PEM-encoded CA certificate for server verification (falls back to the system CA bundle if omitted)
+- Client Certificate — PEM-encoded client certificate for mutual TLS (mTLS)
+- Client Key — PEM-encoded client private key (required when a client certificate is provided)
-### Pricing
+## Additional resources
-For a detailed breakdown of how charges are calculated, refer to [Manage Log Drain usage](/docs/guides/platform/manage-your-usage/log-drains).
+- [Log Drains pricing breakdown](/docs/guides/platform/manage-your-usage/log-drains) — cost per drain, per million events, and egress charges.
+- [Metrics API](/docs/guides/telemetry/metrics) — export Postgres performance metrics alongside your logs.
+- [Tracing with the JS SDK](/docs/guides/telemetry/client-side-tracing) — instrument your application and combine traces with Supabase logs.
diff --git a/apps/docs/data/content-listings/index.ts b/apps/docs/data/content-listings/index.ts
index c0e242c02a5..ed3ea870067 100644
--- a/apps/docs/data/content-listings/index.ts
+++ b/apps/docs/data/content-listings/index.ts
@@ -10,6 +10,7 @@ import {
functionsExamplesWebhooksPayments,
functionsGetStarted,
} from './functions.data'
+import { logDrainsDestinations } from './log-drains.data'
import { realtimeExamples, realtimeGetStarted, realtimeResources } from './realtime.data'
import {
selfHostingCommunity,
@@ -32,6 +33,7 @@ const ALL_GROUPS: readonly ContentListingGroup[] = [
functionsExamplesAiMedia,
functionsExamplesMessaging,
functionsExamplesOperations,
+ logDrainsDestinations,
realtimeGetStarted,
realtimeExamples,
realtimeResources,
diff --git a/apps/docs/data/content-listings/log-drains.data.ts b/apps/docs/data/content-listings/log-drains.data.ts
new file mode 100644
index 00000000000..d828ff2e923
--- /dev/null
+++ b/apps/docs/data/content-listings/log-drains.data.ts
@@ -0,0 +1,64 @@
+import type { ContentListingGroup } from '~/lib/content-listings.schema'
+
+export const logDrainsDestinations: ContentListingGroup = {
+ id: 'log-drains-destinations',
+ heading: 'Choose your destination',
+ type: 'grid',
+ columns: 3,
+ items: [
+ {
+ title: 'Custom Endpoint',
+ description: 'Forward logs as a POST request to any custom HTTP endpoint.',
+ href: '/guides/telemetry/log-drains#custom-endpoint',
+ icon: { kind: 'braces', color: '#3ECF8E', bg: 'rgba(62,207,142,0.1)' },
+ },
+ {
+ title: 'OpenTelemetry (OTLP)',
+ description: 'Send logs to any OTLP-compatible endpoint using Protocol Buffers over HTTP.',
+ href: '/guides/telemetry/log-drains#opentelemetry-otlp',
+ icon: { kind: 'otlp', color: '#F5A623', bg: 'rgba(245,166,35,0.1)' },
+ },
+ {
+ title: 'Datadog',
+ description: 'Stream logs directly into Datadog for monitoring and analysis.',
+ href: '/guides/telemetry/log-drains#datadog',
+ icon: { kind: 'datadog', color: '#632CA6', bg: 'rgba(99,44,166,0.1)' },
+ },
+ {
+ title: 'Loki',
+ description: 'Ingest logs into Grafana Loki using the HTTP push API.',
+ href: '/guides/telemetry/log-drains#loki',
+ icon: { kind: 'grafana', color: '#F05A28', bg: 'rgba(240,90,40,0.1)' },
+ },
+ {
+ title: 'Amazon S3',
+ description: 'Write batched log files directly to an S3 bucket you own.',
+ href: '/guides/telemetry/log-drains#amazon-s3',
+ icon: { kind: 'cloud', color: '#FF9900', bg: 'rgba(255,153,0,0.1)' },
+ },
+ {
+ title: 'Sentry',
+ description: "Send logs to Sentry's Logging product for filtering and grouping.",
+ href: '/guides/telemetry/log-drains#sentry',
+ icon: { kind: 'sentry', color: '#362D59', bg: 'rgba(54,45,89,0.1)' },
+ },
+ {
+ title: 'Axiom',
+ description: 'Forward logs to an Axiom dataset for storage and analysis.',
+ href: '/guides/telemetry/log-drains#axiom',
+ icon: { kind: 'axiom', color: '#6366F1', bg: 'rgba(99,102,241,0.1)' },
+ },
+ {
+ title: 'Last9',
+ description: 'Stream logs to Last9 for OpenTelemetry-native observability.',
+ href: '/guides/telemetry/log-drains#last9',
+ icon: { kind: 'last9', color: '#00B4A0', bg: 'rgba(0,180,160,0.1)' },
+ },
+ {
+ title: 'Syslog',
+ description: 'Forward logs to a remote Syslog receiver over TCP or TLS (RFC 5424).',
+ href: '/guides/telemetry/log-drains#syslog',
+ icon: { kind: 'server', color: '#64748B', bg: 'rgba(100,116,139,0.1)' },
+ },
+ ],
+}
diff --git a/apps/docs/lib/content-listings.schema.ts b/apps/docs/lib/content-listings.schema.ts
index df48028bf00..472fb19522c 100644
--- a/apps/docs/lib/content-listings.schema.ts
+++ b/apps/docs/lib/content-listings.schema.ts
@@ -5,6 +5,7 @@ import {
contentListingGroupSchema,
contentListingGroupTypeSchema,
contentListingHeadingLevelSchema,
+ contentListingIconSchema,
contentListingItemSchema,
} from './content-listings.zod.mjs'
@@ -13,8 +14,10 @@ export {
contentListingGroupSchema,
contentListingGroupTypeSchema,
contentListingHeadingLevelSchema,
+ contentListingIconSchema,
contentListingItemSchema,
}
+export type ContentListingIcon = z.infer<typeof contentListingIconSchema>
export type ContentListingItem = z.infer<typeof contentListingItemSchema>
export type ContentListingGroup = z.infer<typeof contentListingGroupSchema>
diff --git a/apps/docs/lib/content-listings.test.ts b/apps/docs/lib/content-listings.test.ts
index b22f0ffc7db..37d54128d73 100644
--- a/apps/docs/lib/content-listings.test.ts
+++ b/apps/docs/lib/content-listings.test.ts
@@ -4,6 +4,7 @@ import {
ContentListings as ContentListingsMarkdownHandler,
serializeContentListingGroupToMarkdown,
} from '~/internals/markdown-schema/ContentListings'
+import { contentListingItemSchema } from '~/lib/content-listings.schema'
import { isExternalContentListingHref } from '~/lib/content-listings.utils'
import { describe, expect, it } from 'vitest'
@@ -185,6 +186,46 @@ describe('dashboard content listing hrefs', () => {
})
})
+describe('contentListingItemSchema icon', () => {
+ const baseItem = {
+ title: 'Datadog',
+ href: '/guides/telemetry/log-drains#datadog',
+ description: 'Stream logs directly into Datadog for monitoring and analysis.',
+ }
+
+ it('accepts a plain string icon path', () => {
+ const result = contentListingItemSchema.safeParse({
+ ...baseItem,
+ icon: '/docs/img/icons/github-icon',
+ })
+ expect(result.success).toBe(true)
+ })
+
+ it('accepts a well-formed icon chip object', () => {
+ const result = contentListingItemSchema.safeParse({
+ ...baseItem,
+ icon: { kind: 'datadog', color: '#632CA6', bg: 'rgba(99,44,166,0.1)' },
+ })
+ expect(result.success).toBe(true)
+ })
+
+ it('rejects an icon chip object missing bg', () => {
+ const result = contentListingItemSchema.safeParse({
+ ...baseItem,
+ icon: { kind: 'datadog', color: '#632CA6' },
+ })
+ expect(result.success).toBe(false)
+ })
+
+ it('rejects an icon chip object with an unknown kind', () => {
+ const result = contentListingItemSchema.safeParse({
+ ...baseItem,
+ icon: { kind: 'not-a-real-kind', color: '#632CA6', bg: 'rgba(99,44,166,0.1)' },
+ })
+ expect(result.success).toBe(false)
+ })
+})
+
describe('TelemetryEvent union', () => {
it('includes docs_content_listing_clicked', () => {
const event = {
diff --git a/apps/docs/lib/content-listings.zod.mjs b/apps/docs/lib/content-listings.zod.mjs
index 990eb7f1c37..8726d71ba9f 100644
--- a/apps/docs/lib/content-listings.zod.mjs
+++ b/apps/docs/lib/content-listings.zod.mjs
@@ -1,10 +1,30 @@
import { z } from 'zod'
+const contentListingIconKindSchema = z.enum([
+ 'braces',
+ 'otlp',
+ 'datadog',
+ 'grafana',
+ 'cloud',
+ 'sentry',
+ 'axiom',
+ 'last9',
+ 'server',
+])
+
+const contentListingIconChipSchema = z.object({
+ kind: contentListingIconKindSchema,
+ color: z.string().min(1),
+ bg: z.string().min(1),
+})
+
+export const contentListingIconSchema = z.union([z.string().min(1), contentListingIconChipSchema])
+
export const contentListingItemSchema = z.object({
title: z.string().min(1),
href: z.string().min(1),
description: z.string().min(1),
- icon: z.string().min(1).optional(),
+ icon: contentListingIconSchema.optional(),
hasLightIcon: z.boolean().optional(),
badge: z.string().min(1).optional(),
})
diff --git a/supa-mdx-lint/Rule003Spelling.toml b/supa-mdx-lint/Rule003Spelling.toml
index 5ff03ca7c62..45a1b6c9c89 100644
--- a/supa-mdx-lint/Rule003Spelling.toml
+++ b/supa-mdx-lint/Rule003Spelling.toml
@@ -389,6 +389,8 @@ allow_list = [
"Spotify",
"Sqitch",
"Supabase",
+ "[Ss]yslog(s)?",
+ "mTLS",
"Supavisor",
"SvelteKit",
"SwiftUI",