Skip to main content

Supabase Log Monitoring with LogMonitor

>_ why supabase apps need log monitoring

Supabase Edge Functions and database triggers generate logs that are hard to access and search in the Supabase dashboard. When issues arise in your Edge Functions or database operations, you need real-time visibility to debug quickly. LogMonitor streams your Supabase application logs to a Live Console with filtering and structured search.

>_ how logmonitor works with supabase

For Supabase Edge Functions running on Deno, use the LogMonitor HTTP API to send logs via fetch. For Node.js-based backends that connect to Supabase, use the logmonitor-js SDK. The SDK auto-patches console.log, console.info, console.warn, console.error, and console.debug. Logs are only sent in production (when process.env.NODE_ENV === 'production'). Both approaches send logs to your LogMonitor Live Console in real time.

>_ quick start

supabase/functions/process-order/index.ts · typescript
import { serve } from "https://deno.land/std/http/server.ts";
const LOGMONITOR_URL = "https://api.logmonitor.io/v1/logs";
const API_KEY = Deno.env.get("LOGMONITOR_API_KEY")!;
async function sendLog(level: string, message: string) {
  await fetch(LOGMONITOR_URL, {
    method: "POST",
    headers: { "X-Logmonitor-Api-Key": API_KEY, "Content-Type": "application/json" },
    body: JSON.stringify([{ level, message, clientTimestamp: Math.floor(Date.now() / 1000) }]),
  });
  // Returns 202 Accepted on success
}
serve(async (req) => {
  const body = await req.json();
  await sendLog("info", "Edge function invoked");
  return new Response(JSON.stringify({ ok: true }), { headers: { "Content-Type": "application/json" } });
});

>_ what you can monitor

  • $Edge Function invocation errors and timeouts
  • $Database query and RPC call failures
  • $Authentication and RLS policy errors
  • $Realtime subscription issues
  • $Storage bucket operation failures
  • $Webhook processing logs

>_ frequently asked questions

$ Does LogMonitor work with Supabase Edge Functions?

Yes. Supabase Edge Functions run on Deno, which supports the standard fetch API. Use it to send logs to the LogMonitor HTTP API endpoint directly from your Edge Functions.

$ Can I use the logmonitor-js SDK with Supabase?

Yes, if your backend is a Node.js application that connects to Supabase as a database. For Deno-based Edge Functions, use the HTTP API with fetch instead.

$ How do I store my API key for Supabase Edge Functions?

Use Supabase Secrets to store your LogMonitor API key. Run supabase secrets set LOGMONITOR_API_KEY=your-key and access it with Deno.env.get() in your function.

$ Can I monitor Supabase database triggers?

Yes. If you use database webhooks or Edge Functions triggered by database events, add LogMonitor logging inside those handlers to capture the trigger context and any errors.

$ Does LogMonitor work with Supabase's client-side JavaScript library?

For client-side logging, use the logmonitor-js SDK in your frontend application. It captures console calls automatically and works alongside the Supabase client library.

>_ related pages

>_ about logmonitor

LogMonitor.io is a log observability platform built for developers who want simple, fast, affordable log monitoring without enterprise complexity. Stream production logs from your users' devices in real-time with native Flutter and React SDKs. Set up in under 5 minutes, with plans starting at $9/month. No dashboards to configure, no query languages to learn — just your logs, live.

logmonitor --start
Ready to see your production logs in real-time?
Start Monitoring →

Plans from $9/mo · Set up in under 5 minutes