Skip to main content
A Supabase log drain sends your project’s logs to Squasher over OpenTelemetry. For Edge Function errors with stack traces, report them from the function code.

Prerequisites

  • A Supabase project on the Pro, Team, or Enterprise plan. Supabase offers log drains on these plans only.
  • An ingest key. See Create an ingest key.

Set up the drain

  1. In Supabase, open Project Settings and select Log Drains.
  2. Add a destination of type OpenTelemetry (OTLP).
  3. Set Endpoint to https://ingest.squasher.ai/v1/logs.
  4. Set Protocol to http/protobuf. You can turn on Gzip: Squasher reads gzip OTLP bodies.
  5. In Headers, add x-squasher-key with your ingest key, then save the drain.

What Squasher keeps from each record

Squasher stores the attributes that Supabase sends as they are. See What Squasher does with each signal.

Report Edge Function errors

Save SQUASHER_API_KEY and SQUASHER_PROJECT_ID as Edge Function secrets, then post errors to the event endpoint:
supabase/functions/checkout/index.ts
handleCheckout is your own function.

Verify

  1. Select Logs in the sidebar in Squasher. Logs from your Supabase project appear there.
  2. Make the Edge Function throw once.
  3. Select Issues in the sidebar. The error is at the top of the list.

Limits

  • The Supabase drain sends logs only. It does not send database metrics or traces.
  • Which Supabase logs reach ERROR severity depends on Supabase.

Next steps

HTTP API

See every event field.

OpenTelemetry

See how Squasher reads OTLP logs.