Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/supabase-observability

@0d57af8
Run it yourself

Set up monitoring and observability for Supabase projects using Dashboard reports, CLI inspect commands, pg_stat_statements, log drains, and alerting. Use when implementing monitoring, diagnosing slow queries, forwarding logs, or configuring alerts for Supabase project health. Trigger with phrases like "supabase monitoring", "supabase metrics", "supabase observability", "supabase logs", "supabase alerts", "supabase inspect", "supabase log drain".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/supabase-observability

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesquery-analytics-and-log-drains.md

≈511 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Query Analytics and Log Drains

pg_stat_statements

Enable pg_stat_statements for detailed query-level metrics:

-- Enable the extension (Dashboard > Database > Extensions, or SQL)
create extension if not exists pg_stat_statements;

-- Top 20 slowest queries by average execution time
select
  substring(query, 1, 80) as query_preview,
  calls,
  round(mean_exec_time::numeric, 2) as avg_ms,
  round(max_exec_time::numeric, 2) as max_ms,
  round(total_exec_time::numeric, 2) as total_ms,
  rows
from pg_stat_statements
where mean_exec_time > 50
order by mean_exec_time desc
limit 20;

-- Most-called queries (high call count may indicate N+1 problems)
select
  substring(query, 1, 80) as query_preview,
  calls,
  round(mean_exec_time::numeric, 2) as avg_ms,
  rows
from pg_stat_statements
order by calls desc
limit 20;

-- Real-time connection monitoring
select
  state,
  count(*) as connections,
  max(age(now(), state_change))::text as longest_duration
from pg_stat_activity
where datname = current_database()
group by state
order by connections desc;

-- Reset stats after optimization (to measure improvement)
select pg_stat_statements_reset();

Log Drains

Log drains forward Supabase logs to external aggregation tools:

  1. In the project Dashboard, open Project Settings > Log Drains.
  2. Choose a supported destination and provision its credentials through the approved secret-management flow.
  3. Review source data, destination region, retention, cost, and access before enabling the drain.
  4. Send a synthetic event and verify arrival and parsing at the destination; inspect status in the Dashboard.
  5. Disable or remove the drain in the Dashboard when no longer required, then verify forwarding stopped.

See the current log-drain guide for supported integrations and eligibility. No CLI log-drain subcommand is assumed.

Log drain events include API requests, Auth events, Postgres logs, Storage operations, and Edge Function invocations.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides monitoring and observability tools for Supabase projects using the official CLI, SQL diagnostics, and log forwarding. It allows users to track database health, analyze query performance, and set up alerts. While the skill follows official practices, it handles external data such as logs and database statistics, which creates a minor surface for indirect instructions to be processed by the agent.

  • Socket2mo

    1 alert: gptAnomaly

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
What it can do
Reads files Edits files Runs commands
version
1.55.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "supabase",
  "monitoring",
  "observability"
]
All 6 allowed tools
ReadWriteEditBash(npx supabase:*)Bash(supabase:*)Grep
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/supabase-observability