mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
docs: restructure observability navigation and overview (#49505)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Stack Draft stack extracted from `docs/monitoring`. Merge bottom-up. The troubleshooting *catalog* rewrite (`content/troubleshooting` and the Diagnosing UI) stays out of scope. 1. #49503 move inspect and advisors 2. #49501 split Studio logs from ClickHouse queries 3. #49500 treat reports as signal dashboards 4. #49502 add Observe the data hub 5. #49506 add agent setup components 6. #49504 add hire-an-agent templates 7. **#49505** restructure observability nav, overview, Detecting, and flatten Observe the data ← **this PR** ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Docs update. Top layer in the observability stack. ## What is the current behavior? The section is still titled Monitoring and Debugging, with a Debugging / Monitoring split that does not match the new pages. The debugging guide is still the master layer-isolation + symptom table. Observe the data is split into “what data” vs “where to observe it,” which duplicates the source pages. ## What is the new behavior? - Section title is Observability - Overview groups Observe the data, Detect and resolve, Hire an agent, and Export - **Observe the data is flattened by source.** Logs, Metrics API, Database, Advisors, and Reports each list where to read that source. There is no separate MCP/API/CLI/Studio nav group. - **Observe vs Detecting:** Observe is the catalog (what exists, how to access it). Detecting is how to *use* those sources to pick up a Health / Security / Performance / Usage signal. Named errors skip to Diagnosing. - Studio Logs sits under Logs. Reports sits beside the other sources. - Troubleshooting stays in the global menu and also appears as Diagnosing under Detect and resolve ## Additional context This is the last PR in the stack. Together the seven PRs reconstruct the `docs/monitoring` observability IA and guide content, without shipping the troubleshooting catalog overhaul. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-a3cb5ece-925b-4046-b58a-5d69e9a9d794?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-a3cb5ece-925b-4046-b58a-5d69e9a9d794&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Saxon Fletcher <SaxonF@users.noreply.github.com> Co-authored-by: Nik Richers <nik@validmind.ai>
This commit is contained in:
92 files changed
+847
-558
No files matched your search
+5
-7
@@ -9,20 +9,18 @@ import { IS_DEV } from '~/lib/constants'
|
||||
|
||||
type Params = { slug?: string[] }
|
||||
|
||||
const MonitoringTroubleshootingGuidePage = async (props: { params: Promise<Params> }) => {
|
||||
const ObservabilityGuidePage = async (props: { params: Promise<Params> }) => {
|
||||
const params = await props.params
|
||||
const slug = ['monitoring-and-debugging', ...(params.slug ?? [])]
|
||||
const slug = ['observability', ...(params.slug ?? [])]
|
||||
const data = await getGuidesMarkdown(slug)
|
||||
|
||||
return <GuideTemplate {...data!} />
|
||||
}
|
||||
|
||||
const generateStaticParams = !IS_DEV
|
||||
? genGuidesStaticParams('monitoring-and-debugging')
|
||||
: getEmptyArray
|
||||
const generateStaticParams = !IS_DEV ? genGuidesStaticParams('observability') : getEmptyArray
|
||||
const generateMetadata = genGuideMeta((params: { slug?: string[] }) =>
|
||||
getGuidesMarkdown(['monitoring-and-debugging', ...(params.slug ?? [])])
|
||||
getGuidesMarkdown(['observability', ...(params.slug ?? [])])
|
||||
)
|
||||
|
||||
export default MonitoringTroubleshootingGuidePage
|
||||
export default ObservabilityGuidePage
|
||||
export { generateStaticParams, generateMetadata }
|
||||
File renamed without changes.
@@ -16,6 +16,8 @@ import { PROD_URL } from '~/lib/constants'
|
||||
import { getCustomContent } from '~/lib/custom-content/getCustomContent'
|
||||
import { mdAlternate } from '~/lib/md-alternates'
|
||||
import { type Metadata } from 'next'
|
||||
import Link from 'next/link'
|
||||
import { Admonition } from 'ui-patterns/Admonition'
|
||||
|
||||
const { metadataTitle } = getCustomContent(['metadata:title'])
|
||||
|
||||
@@ -32,6 +34,76 @@ export default async function GlobalTroubleshootingPage() {
|
||||
<p className="text-lg text-foreground-light">
|
||||
Search or browse our troubleshooting guides for solutions to common Supabase issues.
|
||||
</p>
|
||||
<p className="text-foreground-light mt-4">
|
||||
Don't have a specific error yet? Start with{' '}
|
||||
<Link href="/guides/observability/detecting" className="text-brand-link hover:underline">
|
||||
Detecting
|
||||
</Link>{' '}
|
||||
to pick up a signal first. If you already have one, confirm one cause before you change
|
||||
anything:
|
||||
</p>
|
||||
<ol className="list-decimal list-outside pl-5 text-foreground-light mt-4 space-y-1">
|
||||
<li>
|
||||
Capture the exact HTTP status, error code, and message. A <code>401</code> is not a{' '}
|
||||
<code>403</code>; <code>PGRST002</code> is not <code>PGRST106</code>. If you use{' '}
|
||||
<code>supabase-js</code>, errors are returned in <code>{'{ data, error }'}</code>, not
|
||||
thrown. Inspect <code>error</code>; ignoring it hides the failure.
|
||||
</li>
|
||||
<li>
|
||||
Query the{' '}
|
||||
<Link
|
||||
href="/guides/observability/advanced-log-filtering#logs-explorer"
|
||||
className="text-brand-link hover:underline"
|
||||
>
|
||||
log source
|
||||
</Link>{' '}
|
||||
for that layer. When two layers could fit, start closer to the database.
|
||||
</li>
|
||||
<li>
|
||||
Search below for that error. Each article confirms one cause, applies one fix, and tells
|
||||
you how to verify it.
|
||||
</li>
|
||||
<li>
|
||||
Re-run the failing operation. Keep the change only when the original symptom is gone. If
|
||||
verification fails, reverse the change and look again.
|
||||
</li>
|
||||
</ol>
|
||||
<p className="text-foreground-light mt-4">
|
||||
For client-side or local debugging, see{' '}
|
||||
<Link
|
||||
href="/guides/auth/debugging/error-codes"
|
||||
className="text-brand-link hover:underline"
|
||||
>
|
||||
Auth error codes
|
||||
</Link>
|
||||
,{' '}
|
||||
<Link href="/guides/storage/debugging/logs" className="text-brand-link hover:underline">
|
||||
Storage logs
|
||||
</Link>
|
||||
, and{' '}
|
||||
<Link
|
||||
href="/guides/functions/debugging-tools"
|
||||
className="text-brand-link hover:underline"
|
||||
>
|
||||
Edge Functions debugging tools
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
<Admonition type="danger" className="mt-4">
|
||||
Deleting data, disabling row-level security, weakening a policy, or terminating a database
|
||||
process can cause data loss or a security incident. Do not let an automated routine
|
||||
perform these changes.
|
||||
</Admonition>
|
||||
<p className="text-foreground-light mt-4">
|
||||
Escalate to{' '}
|
||||
<Link href="/dashboard/support/new" className="text-brand-link hover:underline">
|
||||
Support
|
||||
</Link>{' '}
|
||||
when you cannot access the diagnostic source, the evidence points to a platform failure,
|
||||
or a safe fix needs a permission you do not have. Include the project reference, timestamp
|
||||
with time zone, error code, request ID, and sanitized evidence. Do not include passwords,
|
||||
API keys, or personal data.
|
||||
</p>
|
||||
<hr className="my-7" aria-hidden />
|
||||
<TroubleshootingFilter
|
||||
keywords={keywords}
|
||||
|
||||
@@ -13,7 +13,7 @@ export const metricsStackOptions: MetricsStackOption[] = [
|
||||
title: 'Grafana Cloud (SaaS)',
|
||||
description:
|
||||
'Use Grafana Cloud’s managed Prometheus (works on Free + Pro tiers) and import the Supabase dashboard without running any infrastructure.',
|
||||
href: '/guides/monitoring-and-debugging/metrics/grafana-cloud',
|
||||
href: '/guides/observability/metrics/grafana-cloud',
|
||||
iconKind: 'grafana',
|
||||
iconColor: '#F05A28',
|
||||
iconBg: 'rgba(240,90,40,0.1)',
|
||||
@@ -23,7 +23,7 @@ export const metricsStackOptions: MetricsStackOption[] = [
|
||||
title: 'Grafana + self-hosted Prometheus',
|
||||
description:
|
||||
'Run Prometheus yourself following the official installation guidance and pair it with Grafana plus our dashboard JSON and alert pack.',
|
||||
href: '/guides/monitoring-and-debugging/metrics/grafana-self-hosted',
|
||||
href: '/guides/observability/metrics/grafana-self-hosted',
|
||||
iconKind: 'grafana',
|
||||
iconColor: '#F05A28',
|
||||
iconBg: 'rgba(240,90,40,0.1)',
|
||||
@@ -53,7 +53,7 @@ export const metricsStackOptions: MetricsStackOption[] = [
|
||||
title: 'Vendor-agnostic / BYO Prometheus',
|
||||
description:
|
||||
'Connect AWS AMP, Grafana Mimir, VictoriaMetrics, or any Prometheus-compatible SaaS with the same scrape job pattern.',
|
||||
href: '/guides/monitoring-and-debugging/metrics/vendor-agnostic',
|
||||
href: '/guides/observability/metrics/vendor-agnostic',
|
||||
iconKind: 'flame',
|
||||
iconColor: '#0BA678',
|
||||
iconBg: 'rgba(11,166,120,0.1)',
|
||||
|
||||
@@ -210,17 +210,11 @@ export const GLOBAL_MENU_ITEMS: GlobalMenuItems = [
|
||||
level: 'security',
|
||||
},
|
||||
{
|
||||
label: 'Monitoring and Debugging',
|
||||
label: 'Observability',
|
||||
icon: 'telemetry',
|
||||
href: '/guides/monitoring-and-debugging' as `/${string}`,
|
||||
href: '/guides/observability' as `/${string}`,
|
||||
level: 'telemetry',
|
||||
},
|
||||
{
|
||||
label: 'Troubleshooting',
|
||||
icon: 'troubleshooting',
|
||||
href: '/guides/troubleshooting' as `/${string}`,
|
||||
level: 'troubleshooting',
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
@@ -1161,7 +1155,7 @@ export const database: NavMenuConstant = {
|
||||
},
|
||||
{
|
||||
name: 'Database Advisors',
|
||||
url: '/guides/monitoring-and-debugging/advisors' as `/${string}`,
|
||||
url: '/guides/observability/advisors' as `/${string}`,
|
||||
},
|
||||
{ name: 'Testing your database', url: '/guides/database/testing' },
|
||||
{
|
||||
@@ -1180,7 +1174,7 @@ export const database: NavMenuConstant = {
|
||||
},
|
||||
{
|
||||
name: 'Inspect the database',
|
||||
url: '/guides/monitoring-and-debugging/inspect' as `/${string}`,
|
||||
url: '/guides/observability/inspect' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Debugging performance issues',
|
||||
@@ -3021,119 +3015,147 @@ export const platform: NavMenuConstant = {
|
||||
|
||||
export const telemetry: NavMenuConstant = {
|
||||
icon: 'telemetry',
|
||||
title: 'Monitoring and Debugging',
|
||||
url: '/guides/monitoring-and-debugging',
|
||||
title: 'Observability',
|
||||
url: '/guides/observability',
|
||||
items: [
|
||||
{ name: 'Overview', url: '/guides/monitoring-and-debugging' },
|
||||
{ name: 'Overview', url: '/guides/observability' },
|
||||
{
|
||||
name: 'Observe the data',
|
||||
url: '/guides/monitoring-and-debugging/access-data' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Debugging',
|
||||
url: undefined,
|
||||
url: '/guides/observability/access-data' as `/${string}`,
|
||||
items: [
|
||||
{
|
||||
name: 'Debugging guide',
|
||||
url: '/guides/monitoring-and-debugging/debugging' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Logs',
|
||||
url: '/guides/monitoring-and-debugging/logs' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Query and filter logs',
|
||||
url: '/guides/monitoring-and-debugging/advanced-log-filtering' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Logs field reference',
|
||||
url: '/guides/monitoring-and-debugging/log-field-reference' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Monitoring',
|
||||
url: undefined,
|
||||
items: [
|
||||
{
|
||||
name: 'Log drains',
|
||||
url: '/guides/monitoring-and-debugging/log-drains' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Reports',
|
||||
url: '/guides/monitoring-and-debugging/reports' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Metrics',
|
||||
url: '/guides/monitoring-and-debugging/metrics' as `/${string}`,
|
||||
url: '/guides/observability/advanced-log-filtering' as `/${string}`,
|
||||
items: [
|
||||
{
|
||||
name: 'Overview',
|
||||
url: '/guides/monitoring-and-debugging/metrics' as `/${string}`,
|
||||
name: 'Query and filter logs',
|
||||
url: '/guides/observability/advanced-log-filtering' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Grafana Cloud',
|
||||
url: '/guides/monitoring-and-debugging/metrics/grafana-cloud' as `/${string}`,
|
||||
name: 'Sources',
|
||||
url: '/guides/observability/advanced-log-filtering#logs-explorer' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Grafana self-hosted',
|
||||
url: '/guides/monitoring-and-debugging/metrics/grafana-self-hosted' as `/${string}`,
|
||||
name: 'Logs field reference',
|
||||
url: '/guides/observability/log-field-reference' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Datadog',
|
||||
url: 'https://docs.datadoghq.com/integrations/supabase/' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Elastic',
|
||||
url: 'https://www.elastic.co/docs/reference/integrations/supabase' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Vendor-agnostic setup',
|
||||
url: '/guides/monitoring-and-debugging/metrics/vendor-agnostic' as `/${string}`,
|
||||
name: 'Logs in Studio',
|
||||
url: '/guides/observability/logs' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Sentry integration',
|
||||
url: '/guides/monitoring-and-debugging/sentry-monitoring' as `/${string}`,
|
||||
name: 'Metrics API',
|
||||
url: '/guides/observability/metrics' as `/${string}`,
|
||||
items: [
|
||||
{
|
||||
name: 'Grafana Cloud',
|
||||
url: '/guides/observability/metrics/grafana-cloud' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Grafana self-hosted',
|
||||
url: '/guides/observability/metrics/grafana-self-hosted' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Datadog',
|
||||
url: 'https://docs.datadoghq.com/integrations/supabase/',
|
||||
},
|
||||
{
|
||||
name: 'Elastic',
|
||||
url: 'https://www.elastic.co/docs/reference/integrations/supabase',
|
||||
},
|
||||
{
|
||||
name: 'Vendor-agnostic setup',
|
||||
url: '/guides/observability/metrics/vendor-agnostic' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Tracing with the client SDKs',
|
||||
url: '/guides/monitoring-and-debugging/client-side-tracing' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Inspect the database',
|
||||
url: '/guides/monitoring-and-debugging/inspect' as `/${string}`,
|
||||
name: 'Database',
|
||||
url: '/guides/observability/inspect' as `/${string}`,
|
||||
items: [
|
||||
{
|
||||
name: 'CLI commands',
|
||||
url: '/guides/observability/inspect#using-the-cli' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'SQL',
|
||||
url: '/guides/observability/inspect#using-sql' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Advisors',
|
||||
url: '/guides/monitoring-and-debugging/advisors' as `/${string}`,
|
||||
url: '/guides/observability/advisors' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Reports',
|
||||
url: '/guides/observability/reports' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Detect issues',
|
||||
url: '/guides/observability/detecting' as `/${string}`,
|
||||
items: [
|
||||
{
|
||||
name: 'Detection checks',
|
||||
url: '/guides/observability/detecting' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Diagnose and resolve',
|
||||
url: '/guides/troubleshooting' as `/${string}`,
|
||||
items: [
|
||||
{
|
||||
name: 'Troubleshooting',
|
||||
url: '/guides/troubleshooting' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Hire an agent',
|
||||
url: '/guides/monitoring-and-debugging/automate-with-agents' as `/${string}`,
|
||||
url: '/guides/observability/automate-with-agents' as `/${string}`,
|
||||
items: [
|
||||
{
|
||||
name: 'Generalist',
|
||||
url: '/guides/monitoring-and-debugging/automate-with-agents/all' as `/${string}`,
|
||||
url: '/guides/observability/automate-with-agents/all' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Health monitor',
|
||||
url: '/guides/monitoring-and-debugging/automate-with-agents/health' as `/${string}`,
|
||||
url: '/guides/observability/automate-with-agents/health' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Security monitor',
|
||||
url: '/guides/monitoring-and-debugging/automate-with-agents/security' as `/${string}`,
|
||||
url: '/guides/observability/automate-with-agents/security' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Performance monitor',
|
||||
url: '/guides/monitoring-and-debugging/automate-with-agents/performance' as `/${string}`,
|
||||
url: '/guides/observability/automate-with-agents/performance' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Capacity monitor',
|
||||
url: '/guides/monitoring-and-debugging/automate-with-agents/usage' as `/${string}`,
|
||||
url: '/guides/observability/automate-with-agents/usage' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Export',
|
||||
url: undefined,
|
||||
items: [
|
||||
{
|
||||
name: 'Log drains',
|
||||
url: '/guides/observability/log-drains' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Client-side tracing',
|
||||
url: '/guides/observability/client-side-tracing' as `/${string}`,
|
||||
},
|
||||
{
|
||||
name: 'Sentry integration',
|
||||
url: '/guides/observability/sentry-monitoring' as `/${string}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -135,7 +135,9 @@ export const getMenuId = (pathname: string | null) => {
|
||||
return MenuId.LocalDevelopment
|
||||
case pathname.startsWith('ai-tools'):
|
||||
return MenuId.AiTools
|
||||
case pathname.startsWith('monitoring-and-debugging'):
|
||||
case pathname.startsWith('observability'):
|
||||
return MenuId.Telemetry
|
||||
case pathname.startsWith('troubleshooting'):
|
||||
return MenuId.Telemetry
|
||||
case pathname.startsWith('platform'):
|
||||
return MenuId.Platform
|
||||
|
||||
@@ -8,6 +8,16 @@ import React, { useEffect, useRef } from 'react'
|
||||
|
||||
import MenuIconPicker from './MenuIconPicker'
|
||||
|
||||
type NavAccordionItem = {
|
||||
url?: string
|
||||
items?: NavAccordionItem[]
|
||||
}
|
||||
|
||||
function hasActiveDescendant(item: NavAccordionItem, pathname: string): boolean {
|
||||
if (item.url === pathname) return true
|
||||
return item.items?.some((child) => hasActiveDescendant(child, pathname)) ?? false
|
||||
}
|
||||
|
||||
const HeaderLink = React.memo(function HeaderLink(props: {
|
||||
title: string
|
||||
id: string
|
||||
@@ -35,7 +45,8 @@ const ContentAccordionLink = React.memo(function ContentAccordionLink(props: any
|
||||
const activeItemRef = useRef<HTMLLIElement>(null)
|
||||
|
||||
const isChildActive =
|
||||
props.subItem.items && props.subItem.items.some((child: any) => child.url === pathname)
|
||||
props.subItem.items &&
|
||||
props.subItem.items.some((child: NavAccordionItem) => hasActiveDescendant(child, pathname))
|
||||
|
||||
const LinkContainer = (props) => {
|
||||
const isExternal = props.url.startsWith('https://')
|
||||
@@ -107,6 +118,17 @@ const ContentAccordionLink = React.memo(function ContentAccordionLink(props: any
|
||||
{props.subItem.items
|
||||
.filter((subItem) => subItem.enabled !== false)
|
||||
.map((subSubItem) => {
|
||||
if (subSubItem.items && subSubItem.items.length > 0) {
|
||||
return (
|
||||
<ContentAccordionLink
|
||||
key={subSubItem.name}
|
||||
subItem={subSubItem}
|
||||
subItemIndex={-1}
|
||||
parent={props.subItem}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<li key={`${props.subItem.name}-${subSubItem.url}`}>
|
||||
<Link
|
||||
|
||||
@@ -56,7 +56,7 @@ The Supabase MCP server provides tools organized into feature groups. All groups
|
||||
|
||||
### Debugging
|
||||
|
||||
- `query_logs` - Run a read-only SQL query against project logs to filter, aggregate, or join across log fields. See [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering).
|
||||
- `query_logs` - Run a read-only SQL query against project logs to filter, aggregate, or join across log fields. See [Query and filter logs](/docs/guides/observability/advanced-log-filtering).
|
||||
- `get_advisors` - Get security and performance advisors
|
||||
|
||||
### Development
|
||||
|
||||
@@ -47,11 +47,11 @@ For Teams and Enterprise plans, Supabase provides Advanced Telemetry charts dire
|
||||
|
||||
This chart helps you monitor connection pool usage, identify connection leaks, and plan capacity. It also shows a reference line for your compute size's maximum connection limit.
|
||||
|
||||
For more details on using these monitoring charts, see the [Reports guide](/docs/guides/monitoring-and-debugging/reports#advanced-telemetry).
|
||||
For more details on using these monitoring charts, see the [Reports guide](/docs/guides/observability/reports#advanced-telemetry).
|
||||
|
||||
#### Grafana Dashboard
|
||||
|
||||
Supabase offers a Grafana Dashboard that records and visualizes over 200 project metrics, including connections. For setup instructions, check the [metrics docs](/docs/guides/monitoring-and-debugging/metrics).
|
||||
Supabase offers a Grafana Dashboard that records and visualizes over 200 project metrics, including connections. For setup instructions, check the [metrics docs](/docs/guides/observability/metrics).
|
||||
|
||||
Its "Client Connections" graph displays connections for both Supavisor and Postgres
|
||||

|
||||
|
||||
@@ -388,5 +388,5 @@ PGAudit's [official documentation](https://www.pgaudit.org) focuses on system an
|
||||
|
||||
- [Official `PGAudit` documentation](https://www.pgaudit.org)
|
||||
- [Database Function Logging](/docs/guides/database/functions#general-logging)
|
||||
- [Supabase Logging](/docs/guides/monitoring-and-debugging/logs)
|
||||
- [Supabase Logging](/docs/guides/observability/logs)
|
||||
- [Self-Hosting Logs](/docs/reference/self-hosting-analytics/introduction)
|
||||
@@ -200,6 +200,6 @@ The most efficient way to reclaim disk space, without locks, is to use [pg_repac
|
||||
## Related links
|
||||
|
||||
- [Safe Cascading Deletes](/docs/guides/database/postgres/cascade-deletes)
|
||||
- [Inspect the database](/docs/guides/monitoring-and-debugging/inspect)
|
||||
- [Inspect the database](/docs/guides/observability/inspect)
|
||||
- [Understanding Database and Disk Size](/docs/guides/platform/database-size)
|
||||
- [Bloat in Postgres](/blog/postgres-bloat)
|
||||
@@ -8,12 +8,12 @@ sidebar_label: 'Monitoring'
|
||||
|
||||
Monitoring replication lag is important and there are 3 ways to do this:
|
||||
|
||||
1. Dashboard - In [Reports](/docs/guides/monitoring-and-debugging/reports), you can view the replication lag of your project
|
||||
1. Dashboard - In [Reports](/docs/guides/observability/reports), you can view the replication lag of your project
|
||||
2. Database -
|
||||
- pg_stat_subscription (subscriber) - if PID is null, then the subscription is not active
|
||||
- pg_stat_subscription_stats - look here for error_count to see if there were issues applying or syncing (if yes, check the logs for why)
|
||||
- pg_replication_slots - use this to check if the slot is active and you can also calculate the lag from here
|
||||
3. [Metrics](/docs/guides/monitoring-and-debugging/metrics) - Using the prometheus endpoint for your project
|
||||
3. [Metrics](/docs/guides/observability/metrics) - Using the prometheus endpoint for your project
|
||||
- replication_slots_max_lag_bytes - this is the more important one
|
||||
- pg_stat_replication_replay_lag - lag to replay WAL files from the source DB on the target DB (throttled by disk or high activity)
|
||||
- pg_stat_replication_send_lag - lag in sending WAL files from the source DB (a high lag means that the publisher is not being asked to send new WAL files OR network issues)
|
||||
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
}
|
||||
```
|
||||
|
||||
Importing from the SDK keeps your allow-list aligned with the headers the client libraries send: when you upgrade the SDK version in your function and redeploy, newly added headers are picked up with it. As of `@supabase/supabase-js` v2.112.3 the list includes the trace context headers (`traceparent`, `tracestate`, `baggage`) used by [client-side tracing](/docs/guides/monitoring-and-debugging/client-side-tracing) — functions deployed with an older version need a redeploy before browsers can call them with trace propagation enabled.
|
||||
Importing from the SDK keeps your allow-list aligned with the headers the client libraries send: when you upgrade the SDK version in your function and redeploy, newly added headers are picked up with it. As of `@supabase/supabase-js` v2.112.3 the list includes the trace context headers (`traceparent`, `tracestate`, `baggage`) used by [client-side tracing](/docs/guides/observability/client-side-tracing) — functions deployed with an older version need a redeploy before browsers can call them with trace propagation enabled.
|
||||
|
||||
<Admonition type="note">
|
||||
|
||||
@@ -66,14 +66,14 @@ The allow-list only states what a browser _may_ send — it doesn't change what
|
||||
|
||||
The full list, and when each header is sent:
|
||||
|
||||
| Header | Sent |
|
||||
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `authorization` | Every request (session token or API key) |
|
||||
| `apikey` | Every request |
|
||||
| `x-client-info` | Every request (SDK name and version) |
|
||||
| `content-type` | Requests with a body |
|
||||
| `x-retry-count` | Only on automatic retry attempts (`postgrest-js` retries failed idempotent requests by default) |
|
||||
| `traceparent`, `tracestate`, `baggage` | **Only when [trace propagation](/docs/guides/monitoring-and-debugging/client-side-tracing) is explicitly enabled** — never by default |
|
||||
| Header | Sent |
|
||||
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `authorization` | Every request (session token or API key) |
|
||||
| `apikey` | Every request |
|
||||
| `x-client-info` | Every request (SDK name and version) |
|
||||
| `content-type` | Requests with a body |
|
||||
| `x-retry-count` | Only on automatic retry attempts (`postgrest-js` retries failed idempotent requests by default) |
|
||||
| `traceparent`, `tracestate`, `baggage` | **Only when [trace propagation](/docs/guides/observability/client-side-tracing) is explicitly enabled** — never by default |
|
||||
|
||||
### For versions before 2.95.0
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ Deploy read-only databases across multiple regions, for lower latency and better
|
||||
|
||||
### Log drains
|
||||
|
||||
Export Supabase logs to third-party providers and external tooling. [Docs](/docs/guides/monitoring-and-debugging/log-drains).
|
||||
Export Supabase logs to third-party providers and external tooling. [Docs](/docs/guides/observability/log-drains).
|
||||
|
||||
## Studio
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
title: Monitoring and Debugging
|
||||
---
|
||||
|
||||
Monitor your project, debug errors, and understand what's happening across the Supabase stack.
|
||||
|
||||
Debugging with an AI agent? See [Debug with AI tools](/docs/guides/monitoring-and-debugging/debugging#debug-with-ai-tools) for the MCP tools and agent skill that let it read your logs and advisors.
|
||||
|
||||
<ContentListings id="telemetry-debugging" />
|
||||
|
||||
<ContentListings id="telemetry-monitoring" />
|
||||
@@ -1,80 +0,0 @@
|
||||
---
|
||||
id: 'access-data'
|
||||
title: 'Observe the data'
|
||||
description: 'Query logs, metrics, and database diagnostics from MCP, the CLI, the API, or Studio.'
|
||||
---
|
||||
|
||||
This guide explains how to observe a Supabase project.
|
||||
|
||||
Use this page to:
|
||||
|
||||
- See [what data you can observe](#what-data-you-can-observe)
|
||||
- Choose [where you can observe it](#access-via)
|
||||
|
||||
## What data you can observe [#what-data-you-can-observe]
|
||||
|
||||
The sources are logs, metrics, live Postgres diagnostics, and advisor findings. Open Logs and Reports in Studio when you want a UI on those sources. See [where you can observe it](#access-via).
|
||||
|
||||
### Logs
|
||||
|
||||
Request, database, Auth, Storage, Realtime, and function events in ClickHouse.
|
||||
|
||||
- [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering) — run ClickHouse SQL from Studio, MCP, the API, or a script. Record extra Postgres, API, and Realtime events.
|
||||
- [Logs field reference](/docs/guides/monitoring-and-debugging/log-field-reference) — sources and fields
|
||||
|
||||
### Metrics [#metrics-api]
|
||||
|
||||
Prometheus-compatible CPU, IO, WAL, connections, and query stats. Scrape the [Metrics API](/docs/guides/monitoring-and-debugging/metrics) for custom dashboards, alerting, or retention beyond Studio.
|
||||
|
||||
### Database
|
||||
|
||||
Live Postgres statistics such as bloat, cache hit rate, blocking sessions, index usage, and slow queries. See [Inspect the database](/docs/guides/monitoring-and-debugging/inspect) (`supabase inspect db`) for the command and SQL catalog.
|
||||
|
||||
MCP `execute_sql` can run the same read-only queries.
|
||||
|
||||
### Advisors
|
||||
|
||||
Deterministic security and performance findings. Pull them from [Advisors](/docs/guides/monitoring-and-debugging/advisors).
|
||||
|
||||
## Where you can observe it [#access-via]
|
||||
|
||||
Use the interface that matches where you are working.
|
||||
|
||||
### MCP [#mcp]
|
||||
|
||||
Configure the [Supabase MCP server](/docs/guides/ai-tools/mcp) for one project with read-only mode. The debugging tools are:
|
||||
|
||||
- `query_logs` for bounded log queries. Use the same ClickHouse SQL as [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering).
|
||||
- `execute_sql` for read-only database inspection
|
||||
- `get_advisors` for security and performance findings
|
||||
|
||||
Ask the agent to inspect a time window, error code, or advisor finding. Keep production connections project-scoped and read-only.
|
||||
|
||||
### API [#api]
|
||||
|
||||
Use the Management API when you want the same data from a script:
|
||||
|
||||
- [Query project logs](/docs/reference/api/v1-get-project-logs). Pass ClickHouse SQL in the `sql` parameter. See [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering).
|
||||
- [Security advisors](/docs/reference/api/v1-get-security-advisors) and [performance advisors](/docs/reference/api/v1-get-performance-advisors)
|
||||
- [API usage counts](/docs/reference/api/v1-get-project-usage-api-count)
|
||||
|
||||
Scrape the [Metrics API](/docs/guides/monitoring-and-debugging/metrics) for Prometheus-compatible database series. That endpoint is a project URL, not a Management API route.
|
||||
|
||||
### CLI [#cli]
|
||||
|
||||
Use the [Supabase CLI](/docs/guides/local-development/cli/getting-started) against a linked project:
|
||||
|
||||
- [`supabase inspect db`](/docs/guides/monitoring-and-debugging/inspect) for the database diagnostic catalog
|
||||
- [`supabase db advisors`](/docs/reference/cli/usage#supabase-db-advisors) for security and performance findings
|
||||
|
||||
Run `supabase inspect db help` on the installed CLI to see the reports available in your version.
|
||||
|
||||
### Studio [#studio]
|
||||
|
||||
Use Studio when you want to inspect the project in the browser:
|
||||
|
||||
- [Logs](/docs/guides/monitoring-and-debugging/logs) for the unified Logs view
|
||||
- [Reports](/docs/guides/monitoring-and-debugging/reports) for API, Auth, Storage, Realtime, and database dashboards
|
||||
- [Advisors](/docs/guides/monitoring-and-debugging/advisors) for deterministic security and performance findings
|
||||
|
||||
To send logs or traces to your own stack, see [Log drains](/docs/guides/monitoring-and-debugging/log-drains), [Client-side tracing](/docs/guides/monitoring-and-debugging/client-side-tracing), and [Sentry integration](/docs/guides/monitoring-and-debugging/sentry-monitoring).
|
||||
@@ -1,98 +0,0 @@
|
||||
---
|
||||
id: 'debugging'
|
||||
title: 'Debugging guide'
|
||||
description: 'Isolate and fix Supabase issues by reading the error, isolating the failing layer, and gathering evidence from logs.'
|
||||
---
|
||||
|
||||
Debug by evidence, not by guessing. A Supabase error almost always surfaces at one layer but originates at another, so the fastest path to a fix is finding _where_ the problem is, not pattern-matching the symptom. Retrying a failed request rarely helps; isolating the layer does.
|
||||
|
||||
## Debug with AI tools
|
||||
|
||||
An AI agent can work through this loop for you, but only if it can read your project's evidence instead of guessing from the error message.
|
||||
|
||||
Debugging with an agent needs two things:
|
||||
|
||||
- The [Supabase MCP server](/docs/guides/ai-tools/mcp) provides the tools this guide relies on: `get_logs` for a per-service log dump, `query_logs` to run read-only SQL against your logs for filtering and aggregation (see [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering) for the ClickHouse SQL syntax it accepts), `get_advisors` for security and performance findings, and `execute_sql` to inspect your schema and policies.
|
||||
- The [Supabase agent skill](/docs/guides/ai-tools/ai-skills) teaches the agent this workflow: locate the failing layer, gather evidence from the matching log source, and verify the fix by re-running the operation that failed.
|
||||
|
||||
Install both in one step with the [Supabase plugin for AI coding agents](/docs/guides/ai-tools/plugins). Connecting an agent to your project carries security risks, so read the [MCP security best practices](/docs/guides/ai-tools/mcp#security-risks) first.
|
||||
|
||||
## Follow these debugging steps
|
||||
|
||||
Work through these steps in order, skipping straight to a fix before you have evidence for the cause is the most common way to waste time on a bug.
|
||||
|
||||
1. **Reproduce the issue and read the error precisely.** Capture the exact status code, the error code, and the full message, not a paraphrase. A `401` is not a `403`; `PGRST002` is not `PGRST106`; a Postgres `SQLSTATE` such as `42501`, `42P01`, or `23505` points at the exact failure. The precise error is your strongest clue. If you're using `supabase-js`, remember that errors are **returned, not thrown**, check the `error` field in the `{ data, error }` response object. Make sure your code inspects `error` — a swallowed error is why many bugs look like "nothing happened".
|
||||
2. **Locate the failing layer.** Use the request stack below. The status code and error code usually name the layer for you.
|
||||
3. **Gather evidence for that layer.** Query its logs, run the security and performance advisors, and inspect the schema. Logs are the primary tool, and the layer you identified in the previous step tells you which log source to query. See [Read the logs](#read-the-logs) below.
|
||||
4. **Isolate the cause** using the troubleshooting guide for that layer (see [Find the guide for your symptom](#find-the-guide-for-your-symptom) below). Confirm your hypothesis against the evidence before you act. Most Supabase issues trace back to a small, known set of causes, and the guide explains how to tell them apart.
|
||||
5. **Apply the fix, then verify.** Re-run the exact operation that failed and confirm it now succeeds, and that the corresponding log line is clean. A fix you haven't re-run is still a guess. If a couple of attempts don't resolve it, stop and gather more evidence rather than repeating the same change.
|
||||
|
||||
## Check the request stack
|
||||
|
||||
A request from a client passes through several layers before it reaches your data. Errors propagate upward, so the layer that _reports_ an error is often not the layer that _caused_ it.
|
||||
|
||||
Knowing the shape of the stack is what makes isolating the layer possible.
|
||||
|
||||
```
|
||||
Client (supabase-js / SSR)
|
||||
→ Edge / API gateway → edge_logs (HTTP status, routing, rate limits)
|
||||
The gateway routes each request to ONE of these services. They run in parallel,
|
||||
not as a chain:
|
||||
├→ PostgREST (Data API) → postgrest_logs (low-signal; PGRST* evidence lives in edge_logs and postgres_logs)
|
||||
├→ GoTrue (Auth) → auth_logs (login, JWT, OAuth, email)
|
||||
├→ Storage API → storage_logs (uploads, object access)
|
||||
└→ Realtime → realtime_logs (channels, presence, broadcast)
|
||||
PostgREST, GoTrue, and Storage each reach the database independently:
|
||||
→ Supavisor (connection pooler) → supavisor_logs (pooling, timeouts)
|
||||
→ Postgres (SQL, RLS, triggers) → postgres_logs (SQLSTATE, RLS, functions)
|
||||
```
|
||||
|
||||
Edge Functions sit outside this stack and log separately: `function_edge_logs` for the HTTP request to the function, and `function_logs` for `console` output from inside it.
|
||||
|
||||
<Admonition type="note">
|
||||
|
||||
A permission error or an unexpectedly empty result at the API layer is often a Postgres row-level security or privilege problem one layer down, though filters, authentication, query shape, or a stale schema cache can produce the same symptom. When in doubt, trace toward the database.
|
||||
|
||||
</Admonition>
|
||||
|
||||
## Read the logs
|
||||
|
||||
Once you know the layer, query that layer's log source directly rather than scanning everything. Pick one `source`, bound the time window, and select only the fields you need.
|
||||
|
||||
When a query comes up empty, widen along an anchor, such as a timestamp, request ID, or error code, to follow the same request into the adjacent source (for example from `edge_logs` into `postgres_logs`) instead of broadening into an unfiltered scan.
|
||||
|
||||
A wide, unfiltered query across every source buries the one line you need and, on paid projects, costs more in scanned data.
|
||||
|
||||
The [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering) guide covers the Logs Explorer, the available log sources, and how to write queries against them.
|
||||
|
||||
## Find the guide for your symptom
|
||||
|
||||
Match your symptom to a layer, confirm it against that layer's logs, then open the troubleshooting guide for the specific cause and fix. If a symptom could fit two layers (for example, an auth call failing with what looks like an RLS error), start with the layer closest to the database.
|
||||
|
||||
Supabase updates these troubleshooting guides continuously, so treat this table as a starting point rather than the final word: if your exact symptom isn't listed, search the [troubleshooting index](/docs/guides/troubleshooting) for the error string.
|
||||
|
||||
| Symptom / error | Layer → log source | Troubleshooting guides |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Empty `data` array with rows present; wrong rows returned; UPDATE/DELETE affects 0 rows; `42501` permission denied; `service_role` still blocked; policy not matching | RLS & access → `postgres_logs` | [Empty select array](/docs/guides/troubleshooting/why-is-my-select-returning-an-empty-data-array-and-i-have-data-in-the-table-xvOPgx) · [service_role hits RLS](/docs/guides/troubleshooting/why-is-my-service-role-key-client-getting-rls-errors-or-not-returning-data-7_1K9z) · [Database API 42501](/docs/guides/troubleshooting/database-api-42501-errors) · [RLS Simplified](/docs/guides/troubleshooting/rls-simplified-BJTcS8) · [Deprecated RLS features](/docs/guides/troubleshooting/deprecated-rls-features-Pm77Zs) |
|
||||
| `PGRST002`/`PGRST106`; "schema cache"; "could not find table/relationship"; new column or table not recognized; `42P01`; `520`; API returns nothing | Data API (PostgREST) → `edge_logs`, `postgres_logs` | [Refresh schema cache](/docs/guides/troubleshooting/refresh-postgrest-schema) · [PGRST002](/docs/guides/troubleshooting/postgrest-error-pgrst002-could-not-query-the-database-for-the-schema-cache-c396e9) · [New objects not recognized](/docs/guides/troubleshooting/postgrest-not-recognizing-new-columns-or-functions-bd75f5) · [42P01](/docs/guides/troubleshooting/resolving-42p01-relation-does-not-exist-error-W4_9-V) · [520 errors](/docs/guides/troubleshooting/fixing-520-errors-in-the-database-rest-api-Ur5-B2) · [API not returning](/docs/guides/troubleshooting/why-is-my-supabase-api-call-not-returning-PGzXw0) |
|
||||
| Sign-in/sign-out/session broken; JWT "invalid claim"/"missing sub"; cookies not sent; OAuth redirect wrong; OTP/magic-link expired; MFA/TOTP fails; auth `500`/`503`; emails not arriving | Auth → `auth_logs`, `postgres_logs` | [401 missing sub](/docs/guides/troubleshooting/auth-error-401-invalid-claim-missing-sub--AFwMR) · [500 auth errors](/docs/guides/troubleshooting/resolving-500-status-authentication-errors-7bU5U8) · [503 AuthRetryableFetchError](/docs/guides/troubleshooting/auth-error-503-authretryablefetcherror-51b88c) · [OTP expired](/docs/guides/troubleshooting/otp-verification-failures-token-has-expired-or-otp_expired-errors-5ee4d0) · [OAuth not redirecting](/docs/guides/troubleshooting/oauth-sign-in-isnt-redirecting-on-the-server-side-ShGMtr) · [No auth emails](/docs/guides/troubleshooting/not-receiving-auth-emails-from-the-supabase-project-OFSNzw) · [Next.js auth](/docs/guides/troubleshooting/how-do-you-troubleshoot-nextjs---supabase-auth-issues-riMCZV) |
|
||||
| `statement timeout`; duplicate key or sequence error; trigger errors; slow `ALTER`; blocked queries; disk/memory/swap pressure; index size | Database (Postgres) → `postgres_logs` | [Statement timeout](/docs/guides/troubleshooting/canceling-statement-due-to-statement-timeout-581wFv) · [Duplicate key / sequence](/docs/guides/troubleshooting/inserting-into-sequenceserial-table-causes-duplicate-key-violates-unique-constraint-error-pi6DnC) · [Blocked queries](/docs/guides/troubleshooting/how-to-check-if-my-queries-are-being-blocked-by-other-queries-NSKtR1) · [Disk not shrinking](/docs/guides/troubleshooting/disk-size-not-shrinking-after-deleting-data-135390) · [Autovacuum stalled](/docs/guides/troubleshooting/autovacuum-stalled-due-to-inactive-replication-slot-d55aa2) · [High CPU](/docs/guides/troubleshooting/high-cpu-usage) |
|
||||
| "too many connections"; "remaining connection slots"; `CONNECT_TIMEOUT`; pooler vs. direct connection; read-only transaction; `prepared statement already exists`; `no pg_hba.conf entry`; IPv4/IPv6; SASL/SCRAM | Connections & pooler → `supavisor_logs`, `postgres_logs` | [Too many connections](/docs/guides/troubleshooting/too-many-connections-for-database-postgres) · [Remaining slots](/docs/guides/troubleshooting/database-error-remaining-connection-slots-are-reserved-for-non-replication-superuser-connections-3V3nIb) · [Prepared statement exists](/docs/guides/troubleshooting/error-prepared-statement-xxx-already-exists-3laqeM) · [Read-only transaction](/docs/guides/troubleshooting/resolving-cannot-execute-update-in-a-read-only-transaction-on-transaction-pooler-connections-ef582c) · [CONNECT_TIMEOUT](/docs/guides/troubleshooting/troubleshooting-connect_timeout-or-hanging-queries-in-vercel-serverless-functions-775f92) · [Supavisor terminology](/docs/guides/troubleshooting/supavisor-and-connection-terminology-explained-9pr_ZO) |
|
||||
| Edge Function `401`/`404`/`500`/`503`/`504`/`546`; CPU/memory/wall-clock limit hit; won't deploy; boot error; WebSocket drop; `esm.sh` import fails | Edge Functions → `function_edge_logs`, `function_logs` | [401](/docs/guides/troubleshooting/edge-function-401-error-response) · [500](/docs/guides/troubleshooting/edge-function-500-error-response) · [503 boot](/docs/guides/troubleshooting/edge-function-503-response) · [504](/docs/guides/troubleshooting/edge-function-504-error-response) · [546 resource limit](/docs/guides/troubleshooting/edge-function-546-error-response) · [Shutdown reasons](/docs/guides/troubleshooting/edge-function-shutdown-reasons-explained) · [Deploy fails](/docs/guides/troubleshooting/edge-function-fails-deploy) · [esm.sh import](/docs/guides/troubleshooting/importing-stripe-or-other-modules-from-esmsh-on-deno-edge-functions-throws-an-error-TmbB5p) |
|
||||
| Realtime `TIMED_OUT`; `TooManyChannels`; silent disconnect; missed database changes; broadcast-from-DB warning; heartbeats | Realtime → `realtime_logs` | [TIMED_OUT](/docs/guides/troubleshooting/realtime-connections-timed_out-status) · [TooManyChannels](/docs/guides/troubleshooting/realtime-too-many-channels-error) · [Silent disconnects](/docs/guides/troubleshooting/realtime-handling-silent-disconnections-in-backgrounded-applications-592794) · [Broadcast warning](/docs/guides/troubleshooting/realtime-warn-sending-broadcast-message) · [Heartbeats](/docs/guides/troubleshooting/realtime-heartbeat-messages) · [Logger](/docs/guides/troubleshooting/realtime-debugging-with-logger) |
|
||||
| Upload or list fails; public bucket inaccessible; `relation "objects" does not exist`; file size limit; folder or RLS issue | Storage → `storage_logs`, `postgres_logs` | [Public bucket upload/list](/docs/guides/troubleshooting/why-cant-i-uploadlistetc-my-public-bucket-Z6CmGt) · [403 RLS on upload](/docs/guides/troubleshooting/storage-error-403-forbidden-new-row-violates-row-level-security-policy-on-upload-a94384) · [relation objects does not exist](/docs/guides/troubleshooting/relation-objects-does-not-exist-error-during-storage-uploads-8f21f0) · [File size limits](/docs/guides/troubleshooting/upload-file-size-restrictions-Y4wQLT) · [Folder ops / hierarchical RLS](/docs/guides/troubleshooting/supabase-storage-inefficient-folder-operations-and-hierarchical-rls-challenges-b05a4d) |
|
||||
| Webhook not firing; `pg_cron` job not running; `pg_net` queue stuck; `42501 ... http_request_queue` | Database jobs → `postgres_logs` | [Webhook debugging](/docs/guides/troubleshooting/webhook-debugging-guide-M8sk47) · [pg_cron debugging](/docs/guides/troubleshooting/pgcron-debugging-guide-n1KTaz) · [42501 http_request_queue](/docs/guides/troubleshooting/42501--permission-denied-for-table-httprequestqueue-KnozmQ) |
|
||||
| Reading or querying logs; interpreting Postgres logs; finding API errors in logs; reading metrics | Diagnostics → any log source | [Logging guide](/docs/guides/monitoring-and-debugging/logs) · [Interpret Postgres logs](/docs/guides/troubleshooting/how-to-interpret-and-explore-the-postgres-logs-OuCIOj) · [API errors in logs](/docs/guides/troubleshooting/discovering-and-interpreting-api-errors-in-the-logs-7xREI9) · [Logging levels](/docs/guides/troubleshooting/understanding-postgresql-logging-levels-and-how-they-impact-your-project-KXiJRm) · [View database metrics](/docs/guides/troubleshooting/how-to-view-database-metrics-uqf2z_) |
|
||||
|
||||
For query performance and schema-design questions such as indexing, `EXPLAIN`, N+1 queries, or partitioning, see the [Postgres guides](/docs/guides/database/overview).
|
||||
|
||||
Debugging is complete only once you've re-run the failing operation, confirmed it succeeds, and checked that the layer's logs show a clean result.
|
||||
|
||||
## Per-product debugging
|
||||
|
||||
Each Supabase product has its own debugging resources. Use these as a starting point when the error originates in a specific service.
|
||||
|
||||
- [Database — Inspect the database](/docs/guides/monitoring-and-debugging/inspect)
|
||||
- [Auth — Error codes](/docs/guides/auth/debugging/error-codes)
|
||||
- [Storage — Debugging](/docs/guides/storage/debugging/logs)
|
||||
- [Edge Functions — Local debugging](/docs/guides/functions/debugging-tools)
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Observability
|
||||
description: 'Access project data, detect issues, diagnose findings, and automate repeatable checks with an agent.'
|
||||
---
|
||||
|
||||
<AiPrompt id="monitoring-and-debugging" />
|
||||
|
||||
Monitor your Supabase project with the tools you already use, as a person or an agent.
|
||||
|
||||
## 1. Observe the data
|
||||
|
||||
The sources you can query, and where to read them.
|
||||
|
||||
<ContentListings id="telemetry-access-what" />
|
||||
|
||||
## 2. Detect issues
|
||||
|
||||
Use queries and checks against those sources to pick up health, security, performance, and usage signals.
|
||||
|
||||
<ContentListings id="telemetry-detect" />
|
||||
|
||||
## 3. Diagnose and resolve
|
||||
|
||||
Use a concrete finding, symptom, or error code to identify the cause and apply a known solution.
|
||||
|
||||
<ContentListings id="telemetry-diagnose" />
|
||||
|
||||
## 4. Hire an agent
|
||||
|
||||
Turn the checks you trust into a read-only routine in your agent harness and run it on a schedule.
|
||||
|
||||
<ContentListings id="telemetry-hire-agent" />
|
||||
|
||||
## Export your data
|
||||
|
||||
Send logs and traces to the tools you already run.
|
||||
|
||||
<ContentListings id="telemetry-export" />
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
id: 'access-data'
|
||||
title: 'Observe the data'
|
||||
description: 'Query logs, metrics, database diagnostics, and advisors. Each source page lists Studio, MCP, the API, and the CLI.'
|
||||
---
|
||||
|
||||
This guide lists the project data you can query. Each source page lists where to read that source. To pick up a signal from this data, see [Detecting](/docs/guides/observability/detecting).
|
||||
|
||||
## Logs
|
||||
|
||||
Request, database, Auth, Storage, Realtime, and function events in ClickHouse.
|
||||
|
||||
Query them with SQL in [Query and filter logs](/docs/guides/observability/advanced-log-filtering) from the [Logs Explorer](/dashboard/project/_/logs/explorer), MCP `query_logs`, or the [Management API](/docs/reference/api/v1-get-project-logs). Filter events without SQL in [Logs](/docs/guides/observability/logs). See the [Logs field reference](/docs/guides/observability/log-field-reference) for sources and fields.
|
||||
|
||||
The CLI does not query ClickHouse logs. Call the Management API from a script, or [inspect the database](/docs/guides/observability/inspect) for Postgres diagnostics.
|
||||
|
||||
## Metrics [#metrics-api]
|
||||
|
||||
Prometheus-compatible CPU, IO, WAL, connections, and query stats. Scrape the [Metrics API](/docs/guides/observability/metrics) for custom dashboards, alerting, or retention beyond Studio. Chart a subset of the same window in [Reports](/docs/guides/observability/reports).
|
||||
|
||||
## Database
|
||||
|
||||
Live Postgres statistics such as bloat, cache hit rate, blocking sessions, index usage, and slow queries. Run the same checks from the [SQL Editor](/dashboard/project/_/sql), MCP `execute_sql`, or `supabase inspect db`. See [Inspect the database](/docs/guides/observability/inspect).
|
||||
|
||||
## Advisors
|
||||
|
||||
Deterministic security and performance findings. Pull them from Studio, MCP `get_advisors`, [`supabase db advisors`](/docs/reference/cli/usage#supabase-db-advisors), or the Management API. See [Advisors](/docs/guides/observability/advisors).
|
||||
|
||||
## Reports
|
||||
|
||||
Studio dashboards for API, Auth, Storage, Realtime, and database signals. Use them to pick a time window or resource, then follow [Detecting](/docs/guides/observability/detecting). See [Reports](/docs/guides/observability/reports).
|
||||
+6
-6
@@ -3,7 +3,7 @@ title: 'Query and filter logs'
|
||||
description: 'Query project logs from Studio, MCP, the API, or a script. Record extra Postgres, API, and Realtime events.'
|
||||
---
|
||||
|
||||
This guide explains how to query project logs and how to record extra events. The same ClickHouse SQL runs in the [Logs Explorer](/dashboard/project/_/logs/explorer), the MCP [`query_logs`](/docs/guides/ai-tools/mcp) tool, and the [Management API](/docs/reference/api/v1-get-project-logs). Filter events without SQL in [Logs](/docs/guides/monitoring-and-debugging/logs) in Studio. From a terminal, call the Management API; the CLI inspects the database rather than ClickHouse logs.
|
||||
This guide explains how to query project logs and how to record extra events. The same ClickHouse SQL runs in the [Logs Explorer](/dashboard/project/_/logs/explorer), the MCP [`query_logs`](/docs/guides/ai-tools/mcp) tool, and the [Management API](/docs/reference/api/v1-get-project-logs). Filter events without SQL in [Logs](/docs/guides/observability/logs) in Studio. From a terminal, call the Management API; the CLI inspects the database rather than ClickHouse logs.
|
||||
|
||||
Use this page to:
|
||||
|
||||
@@ -26,11 +26,11 @@ On hosted projects, prefer `query_logs` over `get_logs`. `get_logs` returns a se
|
||||
|
||||
### Studio [#studio]
|
||||
|
||||
Open [Logs](/dashboard/project/_/logs) to filter and inspect events. Open the [Logs Explorer](/dashboard/project/_/logs/explorer) to run ClickHouse SQL. See [Logs](/docs/guides/monitoring-and-debugging/logs) for the unified Logs interface.
|
||||
Open [Logs](/dashboard/project/_/logs) to filter and inspect events. Open the [Logs Explorer](/dashboard/project/_/logs/explorer) to run ClickHouse SQL. See [Logs](/docs/guides/observability/logs) for the unified Logs interface.
|
||||
|
||||
### MCP [#mcp]
|
||||
|
||||
On hosted projects, call [`query_logs`](/docs/guides/ai-tools/mcp) with the same SQL as this guide. Keep the connection project-scoped and read-only. See [Observe the data](/docs/guides/monitoring-and-debugging/access-data#mcp).
|
||||
On hosted projects, call [`query_logs`](/docs/guides/ai-tools/mcp) with the same SQL as this guide. Keep the connection project-scoped and read-only.
|
||||
|
||||
### API [#api]
|
||||
|
||||
@@ -38,7 +38,7 @@ Pass ClickHouse SQL in the `sql` parameter of the [Management API logs endpoint]
|
||||
|
||||
### CLI [#cli]
|
||||
|
||||
The Supabase CLI does not query ClickHouse logs. Call the [Management API](/docs/reference/api/v1-get-project-logs) from a script, or use [`supabase inspect db`](/docs/guides/monitoring-and-debugging/inspect) for database diagnostics. See [Observe the data](/docs/guides/monitoring-and-debugging/access-data#cli).
|
||||
The Supabase CLI does not query ClickHouse logs. Call the [Management API](/docs/reference/api/v1-get-project-logs) from a script, or use [`supabase inspect db`](/docs/guides/observability/inspect) for database diagnostics.
|
||||
|
||||
## Sources [#logs-explorer]
|
||||
|
||||
@@ -82,7 +82,7 @@ For `postgres_logs`, statement text and error detail live in `event_message`. `p
|
||||
|
||||
For API Load Balancer traffic, the upstream database is `log_attributes['load_balancer_redirect_identifier']`.
|
||||
|
||||
See the [Logs field reference](/docs/guides/monitoring-and-debugging/log-field-reference) for the ClickHouse field names on each source.
|
||||
See the [Logs field reference](/docs/guides/observability/log-field-reference) for the ClickHouse field names on each source.
|
||||
|
||||
## Working with API logs [#working-with-api-logs]
|
||||
|
||||
@@ -352,7 +352,7 @@ Identify which service owns the problem from the error or status code first, the
|
||||
|
||||
5. **Reference only fields you have confirmed.**
|
||||
|
||||
A misspelled or non-existent field name either errors or silently returns nothing, which leaves a working query look empty. Confirm field names in the [Logs field reference](/docs/guides/monitoring-and-debugging/log-field-reference), or select `event_message` and inspect a sample row first.
|
||||
A misspelled or non-existent field name either errors or silently returns nothing, which leaves a working query look empty. Confirm field names in the [Logs field reference](/docs/guides/observability/log-field-reference), or select `event_message` and inspect a sample row first.
|
||||
|
||||
## Examples and templates
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ description: 'Deterministic security and performance findings you or an agent ca
|
||||
|
||||
Advisors are programmatic checks that ship with the platform. They inspect the live schema and return deterministic findings, such as missing indexes or incorrectly configured RLS policies.
|
||||
|
||||
Use them as part of ongoing observability, together with [logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering). A finding is not a fix. Confirm it against recent log evidence, then search [troubleshooting](/docs/guides/troubleshooting) for the check name or the object it names.
|
||||
Use them as part of ongoing observability, together with [logs](/docs/guides/observability/advanced-log-filtering). A finding is not a fix. Confirm it against recent log evidence, then search [Diagnosing](/docs/guides/troubleshooting) for the check name or the object it names.
|
||||
|
||||
You or an agent can pull the same checks from:
|
||||
|
||||
+6
-6
@@ -11,12 +11,12 @@ This guide explains how to run a Supabase monitoring agent in your own harness.
|
||||
|
||||
Start with one monitor. Add another only when the project needs a different source or cadence.
|
||||
|
||||
| Monitor | What it watches | Default cadence | Use it when |
|
||||
| --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------- | -------------------------------------------------------------- |
|
||||
| [Health monitor](/docs/guides/monitoring-and-debugging/automate-with-agents/health) | API and Auth server errors, error-rate spikes, connection pressure | Hourly | You need incident detection and regular feedback loops |
|
||||
| [Security monitor](/docs/guides/monitoring-and-debugging/automate-with-agents/security) | Security Advisor findings, authentication and authorization failures | Daily | You need a regular access-control and configuration review |
|
||||
| [Performance monitor](/docs/guides/monitoring-and-debugging/automate-with-agents/performance) | Slow queries, lock waits, long-running sessions, Performance Advisor findings | Hourly | You need query and database performance checks |
|
||||
| [Capacity monitor](/docs/guides/monitoring-and-debugging/automate-with-agents/usage) | Request, error, storage, table, and connection growth | Daily | You need to identify growth before it reaches a resource limit |
|
||||
| Monitor | What it watches | Default cadence | Use it when |
|
||||
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------- | -------------------------------------------------------------- |
|
||||
| [Health monitor](/docs/guides/observability/automate-with-agents/health) | API and Auth server errors, error-rate spikes, connection pressure | Hourly | You need incident detection and regular feedback loops |
|
||||
| [Security monitor](/docs/guides/observability/automate-with-agents/security) | Security Advisor findings, authentication and authorization failures | Daily | You need a regular access-control and configuration review |
|
||||
| [Performance monitor](/docs/guides/observability/automate-with-agents/performance) | Slow queries, lock waits, long-running sessions, Performance Advisor findings | Hourly | You need query and database performance checks |
|
||||
| [Capacity monitor](/docs/guides/observability/automate-with-agents/usage) | Request, error, storage, table, and connection growth | Daily | You need to identify growth before it reaches a resource limit |
|
||||
|
||||
For a small project, run the most relevant routine daily or weekly and include the other categories in its prompt. Split it into specialized monitors only when you need different owners, schedules, or alert thresholds.
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -279,4 +279,4 @@ After trace context is flowing through, the `trace_id` appears in:
|
||||
- **API Gateway logs** — every request to PostgREST, Auth, Storage, and Realtime
|
||||
- **Edge Function logs** — invocations and any structured logs emitted from within the function
|
||||
|
||||
If you forward Supabase logs to a third-party backend via [Log Drains](/docs/guides/monitoring-and-debugging/log-drains), you can join Supabase logs to your own client and server traces using the shared `trace_id`. This is especially useful for self-hosted setups where you already operate your own OpenTelemetry collector — Supabase logs become first-class citizens in your existing tracing UI.
|
||||
If you forward Supabase logs to a third-party backend via [Log Drains](/docs/guides/observability/log-drains), you can join Supabase logs to your own client and server traces using the shared `trace_id`. This is especially useful for self-hosted setups where you already operate your own OpenTelemetry collector — Supabase logs become first-class citizens in your existing tracing UI.
|
||||
@@ -0,0 +1,283 @@
|
||||
---
|
||||
id: 'detecting'
|
||||
title: 'Detecting issues'
|
||||
description: 'Run Health, Security, Performance, and Usage checks against logs and database statistics to pick up actionable signals.'
|
||||
---
|
||||
|
||||
Detection is the step between accessing project data and troubleshooting a specific problem. Use the sources in [Observe the data](/docs/guides/observability/access-data) to produce a count, rate, trend, or named finding. Do not try to prove the root cause yet.
|
||||
|
||||
This guide provides starting checks for [Health](#health), [Security](#security), [Performance](#performance), and [Usage](#usage). The log examples use ClickHouse SQL in the [Logs Explorer](/dashboard/project/_/logs/explorer) or MCP `query_logs`. The database examples use Postgres SQL in the [SQL Editor](/dashboard/project/_/sql) or MCP `execute_sql`.
|
||||
|
||||
Use a time range that represents normal traffic, then compare it with the same period after a deployment or configuration change. When a check returns a spike, error code, SQLSTATE, object name, or advisor finding, take that evidence to [Diagnosing](/docs/guides/troubleshooting).
|
||||
|
||||
## Health
|
||||
|
||||
Health checks answer whether a service is available and behaving within its normal error and resource envelope.
|
||||
|
||||
### Measure API server-error rate
|
||||
|
||||
Count requests and 5xx responses by hour. A rate is more useful than a raw error count when traffic changes.
|
||||
|
||||
```sql
|
||||
select
|
||||
toStartOfHour(timestamp) as hour,
|
||||
count() as requests,
|
||||
countIf(toInt32OrZero(log_attributes['response.status_code']) >= 500) as server_errors,
|
||||
round(
|
||||
100.0 * countIf(toInt32OrZero(log_attributes['response.status_code']) >= 500) /
|
||||
nullIf(count(), 0),
|
||||
2
|
||||
) as server_error_percent
|
||||
from logs
|
||||
where source = 'edge_logs'
|
||||
group by hour
|
||||
order by hour desc
|
||||
limit 24;
|
||||
```
|
||||
|
||||
### Find failing API paths
|
||||
|
||||
Use the rate check to find an affected window, then identify the paths and status codes producing the errors.
|
||||
|
||||
```sql
|
||||
select
|
||||
log_attributes['request.path'] as path,
|
||||
toInt32OrZero(log_attributes['response.status_code']) as status,
|
||||
count() as errors
|
||||
from logs
|
||||
where source = 'edge_logs'
|
||||
and toInt32OrZero(log_attributes['response.status_code']) >= 500
|
||||
group by path, status
|
||||
order by errors desc
|
||||
limit 20;
|
||||
```
|
||||
|
||||
### Check Postgres connection pressure
|
||||
|
||||
Compare active and waiting connections with the configured limit. A high percentage is a signal to inspect pooler settings, long-running transactions, and traffic before changing the limit.
|
||||
|
||||
```sql
|
||||
select
|
||||
count(*) as current_connections,
|
||||
count(*) filter (where state = 'active') as active_connections,
|
||||
count(*) filter (where wait_event_type is not null) as waiting_connections,
|
||||
current_setting('max_connections')::int as max_connections,
|
||||
round(
|
||||
100.0 * count(*) / nullif(current_setting('max_connections')::int, 0),
|
||||
2
|
||||
) as connection_percent
|
||||
from pg_stat_activity;
|
||||
```
|
||||
|
||||
You can read API response errors and service availability in [Reports](/docs/guides/observability/reports), or use the [Metrics API](/docs/guides/observability/metrics) for CPU and connection series. Once you have a failing path, status, or saturated resource, continue in [Diagnosing](/docs/guides/troubleshooting).
|
||||
|
||||
## Security
|
||||
|
||||
Security checks look for access-control findings and changes in authentication or authorization failures. Treat them as review signals, not proof of an attack.
|
||||
|
||||
### Measure authorization failures
|
||||
|
||||
Count 401 and 403 responses by hour and status. Compare the rate with a known-good window so normal unauthenticated traffic does not become an alert by itself.
|
||||
|
||||
```sql
|
||||
select
|
||||
toStartOfHour(timestamp) as hour,
|
||||
toInt32OrZero(log_attributes['response.status_code']) as status,
|
||||
count() as failures
|
||||
from logs
|
||||
where source = 'edge_logs'
|
||||
and toInt32OrZero(log_attributes['response.status_code']) in (401, 403)
|
||||
group by hour, status
|
||||
order by hour desc, status
|
||||
limit 48;
|
||||
```
|
||||
|
||||
### Find affected paths and methods
|
||||
|
||||
After detecting a spike, group failures by route and method. This separates a broken client flow from failures spread across the API.
|
||||
|
||||
```sql
|
||||
select
|
||||
log_attributes['request.method'] as method,
|
||||
log_attributes['request.path'] as path,
|
||||
toInt32OrZero(log_attributes['response.status_code']) as status,
|
||||
count() as failures
|
||||
from logs
|
||||
where source = 'edge_logs'
|
||||
and toInt32OrZero(log_attributes['response.status_code']) in (401, 403)
|
||||
group by method, path, status
|
||||
order by failures desc
|
||||
limit 20;
|
||||
```
|
||||
|
||||
### Find public-schema tables without RLS
|
||||
|
||||
This database query is a focused inventory check. Confirm each result against the project's intended access model; a result is not evidence that data was exposed.
|
||||
|
||||
```sql
|
||||
select
|
||||
n.nspname as schema_name,
|
||||
c.relname as table_name
|
||||
from
|
||||
pg_class as c
|
||||
join pg_namespace as n on n.oid = c.relnamespace
|
||||
where n.nspname = 'public' and c.relkind in ('r', 'p') and not c.relrowsecurity
|
||||
order by table_name;
|
||||
```
|
||||
|
||||
Run [Security Advisor](/docs/guides/observability/advisors) from Studio, MCP `get_advisors`, the CLI, or the Management API for the full catalog of deterministic checks. Take a lint name, table, policy, path, or status pattern to [Diagnosing](/docs/guides/troubleshooting) before changing policies, grants, or keys.
|
||||
|
||||
## Performance
|
||||
|
||||
Performance checks identify expensive work, contention, and cache misses. They narrow the investigation to a query, relation, session, or resource.
|
||||
|
||||
### Find long-running sessions
|
||||
|
||||
Look for sessions that have been active or idle in a transaction for more than 30 seconds.
|
||||
|
||||
```sql
|
||||
select
|
||||
pid,
|
||||
usename as role,
|
||||
state,
|
||||
now() - query_start as duration,
|
||||
wait_event_type,
|
||||
wait_event,
|
||||
left(query, 120) as query
|
||||
from pg_stat_activity
|
||||
where datname = current_database()
|
||||
and pid != pg_backend_pid()
|
||||
and state in ('active', 'idle in transaction')
|
||||
and now() - query_start > interval '30 seconds'
|
||||
order by duration desc
|
||||
limit 20;
|
||||
```
|
||||
|
||||
### Find blocked sessions
|
||||
|
||||
Use `pg_blocking_pids` to name the blocked and blocking processes. Do not cancel either process until you understand the transaction and its impact.
|
||||
|
||||
```sql
|
||||
select
|
||||
blocked.pid as blocked_pid,
|
||||
blocked.usename as blocked_role,
|
||||
blocker.pid as blocking_pid,
|
||||
blocker.usename as blocking_role,
|
||||
now() - blocked.query_start as blocked_for,
|
||||
left(blocked.query, 120) as blocked_query,
|
||||
left(blocker.query, 120) as blocking_query
|
||||
from pg_stat_activity as blocked
|
||||
cross join lateral unnest(pg_blocking_pids(blocked.pid)) as blocking_pid
|
||||
join pg_stat_activity as blocker on blocker.pid = blocking_pid
|
||||
order by blocked_for desc;
|
||||
```
|
||||
|
||||
### Find expensive query patterns
|
||||
|
||||
`pg_stat_statements` aggregates normalized queries over time. Rank by total execution time, then inspect mean time and calls before deciding whether a frequent query is inefficient.
|
||||
|
||||
```sql
|
||||
select
|
||||
calls,
|
||||
round(total_exec_time::numeric, 2) as total_time_ms,
|
||||
round(mean_exec_time::numeric, 2) as mean_time_ms,
|
||||
rows,
|
||||
left(query, 160) as query
|
||||
from pg_stat_statements
|
||||
order by total_exec_time desc
|
||||
limit 20;
|
||||
```
|
||||
|
||||
### Measure shared-buffer hit rate
|
||||
|
||||
A ratio below 99% means more than 1% of observed block accesses missed `shared_buffers`. Postgres cannot tell whether a miss was served by the operating system cache or physical disk.
|
||||
|
||||
```sql
|
||||
select
|
||||
'index hit rate' as name,
|
||||
round(100.0 * sum(idx_blks_hit) / nullif(sum(idx_blks_hit) + sum(idx_blks_read), 0), 2) as ratio
|
||||
from pg_statio_user_indexes
|
||||
union all
|
||||
select
|
||||
'table hit rate' as name,
|
||||
round(
|
||||
100.0 * sum(heap_blks_hit) / nullif(sum(heap_blks_hit) + sum(heap_blks_read), 0),
|
||||
2
|
||||
) as ratio
|
||||
from pg_statio_user_tables;
|
||||
```
|
||||
|
||||
Pull [Performance Advisor](/docs/guides/observability/advisors) findings and compare the same window with [Reports](/docs/guides/observability/reports) or the [Metrics API](/docs/guides/observability/metrics). The full command and SQL catalog is in [Inspect the database](/docs/guides/observability/inspect).
|
||||
|
||||
## Usage
|
||||
|
||||
Usage checks identify growth in traffic, data, and connections before it becomes a capacity problem. They do not calculate billing totals.
|
||||
|
||||
### Trend API requests
|
||||
|
||||
Count requests by hour to establish a baseline and spot step changes.
|
||||
|
||||
```sql
|
||||
select
|
||||
toStartOfHour(timestamp) as hour,
|
||||
count() as requests
|
||||
from logs
|
||||
where source = 'edge_logs'
|
||||
group by hour
|
||||
order by hour desc
|
||||
limit 168;
|
||||
```
|
||||
|
||||
### Find high-volume API paths
|
||||
|
||||
Group by method and path to identify which workload accounts for the growth.
|
||||
|
||||
```sql
|
||||
select
|
||||
log_attributes['request.method'] as method,
|
||||
log_attributes['request.path'] as path,
|
||||
count() as requests
|
||||
from logs
|
||||
where source = 'edge_logs'
|
||||
group by method, path
|
||||
order by requests desc
|
||||
limit 20;
|
||||
```
|
||||
|
||||
### Find the largest relations
|
||||
|
||||
Measure tables and their indexes together. Save the result on a regular cadence to establish a growth trend.
|
||||
|
||||
```sql
|
||||
select
|
||||
schemaname,
|
||||
relname as table_name,
|
||||
pg_total_relation_size(relid) as total_bytes,
|
||||
pg_size_pretty(pg_total_relation_size(relid)) as total_size
|
||||
from pg_catalog.pg_statio_user_tables
|
||||
order by total_bytes desc
|
||||
limit 20;
|
||||
```
|
||||
|
||||
### Count connections by role and state
|
||||
|
||||
Connection growth can reveal a new workload or a client that is not pooling correctly.
|
||||
|
||||
```sql
|
||||
select
|
||||
usename as role,
|
||||
state,
|
||||
count(*) as connections
|
||||
from pg_stat_activity
|
||||
where datname = current_database()
|
||||
group by role, state
|
||||
order by connections desc;
|
||||
```
|
||||
|
||||
[Reports](/docs/guides/observability/reports) show request, disk, and database-size trends without SQL. The [Management API usage endpoint](/docs/reference/api/v1-get-project-usage-api-count) returns request counts for authorized scripts. Use [`supabase inspect db table-sizes`](/docs/reference/cli/supabase-inspect-db-table-sizes) and [`bloat`](/docs/reference/cli/supabase-inspect-db-bloat) to run related database checks from the CLI.
|
||||
|
||||
## Turn a detection into a diagnosis
|
||||
|
||||
A detection result should name an affected time window and at least one concrete anchor: a path, status, SQLSTATE, request ID, query, relation, PID, policy, or advisor lint. Take that evidence to [Diagnosing](/docs/guides/troubleshooting), identify the cause, apply the smallest relevant solution, and rerun the same detection check to verify the result.
|
||||
|
||||
After a check is useful and repeatable, [hire an agent](/docs/guides/observability/automate-with-agents) to run it on a schedule.
|
||||
+8
-4
@@ -6,14 +6,18 @@ description: 'Read live Postgres statistics such as bloat, cache hit rate, locks
|
||||
|
||||
Database performance is a large topic and many factors can contribute. Common causes of poor performance include inefficient schemas or queries, missing or unused indexes, insufficient memory, lock contention, and table bloat.
|
||||
|
||||
Use the live Postgres statistics in this guide to check for those conditions. The same checks run as `supabase inspect db` commands, as SQL in the [SQL Editor](/dashboard/project/_/sql), or as MCP `execute_sql`.
|
||||
Use the live Postgres statistics in this guide to check for those conditions. You or an agent can run the same checks from:
|
||||
|
||||
- Studio: [SQL Editor](/dashboard/project/_/sql)
|
||||
- MCP: `execute_sql`
|
||||
- CLI: [`supabase inspect db`](/docs/reference/cli/supabase-inspect-db)
|
||||
|
||||
Use this page to:
|
||||
|
||||
- Run [CLI inspection commands](#using-the-cli)
|
||||
- Copy the matching [SQL](#using-sql)
|
||||
|
||||
If you are checking whether something is wrong, start with the [debugging guide](/docs/guides/monitoring-and-debugging/debugging). For project logs, metrics, and advisors, see [Observe the data](/docs/guides/monitoring-and-debugging/access-data).
|
||||
To pick up a signal from these checks, see [Detecting](/docs/guides/observability/detecting). For the other sources, see [Observe the data](/docs/guides/observability/access-data).
|
||||
|
||||
## Using the CLI
|
||||
|
||||
@@ -238,6 +242,6 @@ from pg_statio_user_tables;
|
||||
|
||||
This shows the ratio of data blocks fetched from the Postgres [shared_buffers](https://www.postgresql.org/docs/15/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-MEMORY) cache against the data blocks that were read from disk or the OS cache.
|
||||
|
||||
A ratio below 99% means more than 1% of observed block accesses missed `shared_buffers`. Postgres cannot distinguish whether those reads were served by the operating system cache or physical disk. Treat that as a performance signal in the [debugging guide](/docs/guides/monitoring-and-debugging/debugging), then search [troubleshooting](/docs/guides/troubleshooting).
|
||||
A ratio below 99% means more than 1% of observed block accesses missed `shared_buffers`. Postgres cannot distinguish whether those reads were served by the operating system cache or physical disk. Treat that as a [Performance](/docs/guides/observability/detecting#performance) signal, then search [Diagnosing](/docs/guides/troubleshooting).
|
||||
|
||||
When a check names a slow statement, get a query plan with [`explain`](/docs/guides/database/query-optimization#analyze-the-query-plan) in SQL, or [`explain()`](/docs/guides/database/debugging-performance) on the Data API. Pair `pg_stat_statements` with the [Metrics API](/docs/guides/monitoring-and-debugging/metrics) to read the same window from Postgres stats and host metrics.
|
||||
When a check names a slow statement, get a query plan with [`explain`](/docs/guides/database/query-optimization#analyze-the-query-plan) in SQL, or [`explain()`](/docs/guides/database/debugging-performance) on the Data API. Pair `pg_stat_statements` with the [Metrics API](/docs/guides/observability/metrics) to read the same window from Postgres stats and host metrics.
|
||||
+3
-3
@@ -9,7 +9,7 @@ Log drains send all logs of the Supabase stack to one or more desired destinatio
|
||||
## What you can do with log drains
|
||||
|
||||
- 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/monitoring-and-debugging/client-side-tracing) to extend your traces into Supabase.
|
||||
- Combine Supabase logs with application-level traces — see [Tracing with the JS SDK](/docs/guides/observability/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.
|
||||
|
||||
@@ -335,5 +335,5 @@ Logs are forwarded to a remote Syslog receiver using TCP or TLS, adhering to [RF
|
||||
## Additional resources
|
||||
|
||||
- [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/monitoring-and-debugging/metrics) — export Postgres performance metrics alongside your logs.
|
||||
- [Tracing with the JS SDK](/docs/guides/monitoring-and-debugging/client-side-tracing) — instrument your application and combine traces with Supabase logs.
|
||||
- [Metrics API](/docs/guides/observability/metrics) — export Postgres performance metrics alongside your logs.
|
||||
- [Tracing with the JS SDK](/docs/guides/observability/client-side-tracing) — instrument your application and combine traces with Supabase logs.
|
||||
+1
-1
@@ -6,7 +6,7 @@ description: 'Supabase Logs field reference'
|
||||
|
||||
Use this reference to find the fields available for each log source. Query `id`, `timestamp`, `event_message`, and `source` as top-level columns. Other structured fields are keys in the `log_attributes` map: drop the `metadata.` prefix shown in the source schema and keep the rest of the dotted path.
|
||||
|
||||
For example, the schema path `metadata.request.cf.country` is queried as `log_attributes['request.cf.country']`. See [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering) for complete ClickHouse examples.
|
||||
For example, the schema path `metadata.request.cf.country` is queried as `log_attributes['request.cf.country']`. See [Query and filter logs](/docs/guides/observability/advanced-log-filtering) for complete ClickHouse examples.
|
||||
|
||||
<SharedData data="logConstants">
|
||||
{(logConstants) => (
|
||||
+6
-6
@@ -6,11 +6,11 @@ description: 'Inspect project log events in the unified Logs view in Studio'
|
||||
|
||||
This guide explains how to inspect project logs in Studio. Log retention is based on your [project's pricing plan](/pricing). For details on how Logs usage is billed, see [Manage Logs usage](/docs/guides/platform/manage-your-usage/logs).
|
||||
|
||||
Use this page to filter and inspect events in [Logs](#product-logs). To query the same data with SQL from Studio, MCP, the API, or a script, or to record extra Postgres, API, and Realtime events, see [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering).
|
||||
Use this page to filter and inspect events in [Logs](#product-logs). To query the same data with SQL from Studio, MCP, the API, or a script, or to record extra Postgres, API, and Realtime events, see [Query and filter logs](/docs/guides/observability/advanced-log-filtering).
|
||||
|
||||
<Admonition type="note">
|
||||
|
||||
If you already have a specific error, start at [Find the guide for your symptom](/docs/guides/monitoring-and-debugging/debugging#find-the-guide-for-your-symptom). If you are checking whether the project is healthy, start with the [debugging guide](/docs/guides/monitoring-and-debugging/debugging).
|
||||
If you already have a specific error, start at [Diagnosing](/docs/guides/troubleshooting). To pick up a signal from these events, see [Detecting](/docs/guides/observability/detecting).
|
||||
|
||||
</Admonition>
|
||||
|
||||
@@ -22,7 +22,7 @@ If you don't select a log type, Logs queries **Postgres** and **API Gateway** ev
|
||||
|
||||
<Admonition type="note">
|
||||
|
||||
For regular expression filtering, structured-field queries, and field discovery, see [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering).
|
||||
For regular expression filtering, structured-field queries, and field discovery, see [Query and filter logs](/docs/guides/observability/advanced-log-filtering).
|
||||
|
||||
</Admonition>
|
||||
|
||||
@@ -38,7 +38,7 @@ Refresh the table, hide columns, download matching rows as CSV or JSON, or turn
|
||||
|
||||
### Log types
|
||||
|
||||
Selecting a log type in Studio queries the matching ClickHouse `source`. For the `source` names to use in SQL, see [Sources](/docs/guides/monitoring-and-debugging/advanced-log-filtering#logs-explorer).
|
||||
Selecting a log type in Studio queries the matching ClickHouse `source`. For the `source` names to use in SQL, see [Sources](/docs/guides/observability/advanced-log-filtering#logs-explorer).
|
||||
|
||||
| Log type | Events |
|
||||
| ------------- | ----------------------------------------------------------------- |
|
||||
@@ -56,9 +56,9 @@ Selecting **API Gateway** is not the same as selecting **Auth**, **Storage**, or
|
||||
|
||||
### Postgres [#postgres]
|
||||
|
||||
Postgres logs show queries and activity for your database. Connection lifecycle events appear here when [connection logging](/docs/guides/monitoring-and-debugging/advanced-log-filtering#logging-postgres-connections) is enabled. They are included by default; clear **Connection logs** under the Postgres log type to hide them.
|
||||
Postgres logs show queries and activity for your database. Connection lifecycle events appear here when [connection logging](/docs/guides/observability/advanced-log-filtering#logging-postgres-connections) is enabled. They are included by default; clear **Connection logs** under the Postgres log type to hide them.
|
||||
|
||||
To record additional statement classes, see [Logging Postgres queries](/docs/guides/monitoring-and-debugging/advanced-log-filtering#logging-postgres-queries).
|
||||
To record additional statement classes, see [Logging Postgres queries](/docs/guides/observability/advanced-log-filtering#logging-postgres-queries).
|
||||
|
||||
### Inspect a log
|
||||
|
||||
+3
-1
@@ -6,6 +6,8 @@ description: 'Export Supabase database metrics to any Prometheus-compatible tool
|
||||
|
||||
Every Supabase project exposes a [Prometheus](https://prometheus.io/)-compatible **Metrics API** endpoint that surfaces ~200 Postgres performance and health series. You can scrape it into any observability stack to power custom dashboards, alerting rules, or long-term retention that goes beyond what Supabase Studio provides out of the box.
|
||||
|
||||
Chart a subset of the same window in Studio [Reports](/docs/guides/observability/reports). Use this page when you want the Prometheus-compatible scrape endpoint.
|
||||
|
||||
<Admonition type="note">
|
||||
|
||||
The Metrics API is currently in beta. Metric names and labels might evolve as we expand the dataset, and the feature is not available in self-hosted Supabase instances.
|
||||
@@ -40,5 +42,5 @@ Pick the workflow that best matches your tooling. Cards link to Supabase-authore
|
||||
- [Grafana Cloud’s Supabase integration doc](https://grafana.com/docs/grafana-cloud/monitor-infrastructure/integrations/integration-reference/integration-supabase/) (community-maintained, built on this Metrics API).
|
||||
- [Datadog’s Supabase integration doc](https://docs.datadoghq.com/integrations/supabase/) (community-maintained, built on this Metrics API).
|
||||
- [Elastic’s Supabase integration doc](https://www.elastic.co/docs/reference/integrations/supabase) (community-maintained).
|
||||
- [Log Drains ](/docs/guides/monitoring-and-debugging/log-drains) for exporting event-based telemetry alongside metrics.
|
||||
- [Log Drains ](/docs/guides/observability/log-drains) for exporting event-based telemetry alongside metrics.
|
||||
- [Query Performance report](/dashboard/project/_/observability/query-performance) for built-in visualizations based on the same underlying metrics.
|
||||
File renamed without changes.
+1
-1
@@ -10,7 +10,7 @@ Self-hosting [Prometheus](https://prometheus.io/docs/prometheus/latest/installat
|
||||
|
||||
Use this guide only if you need full manual control (custom scrape topology, self-hosted Prometheus or non-standard auth).
|
||||
|
||||
Otherwise, use the [Grafana Cloud integration](/docs/guides/monitoring-and-debugging/metrics/grafana-cloud#installation) available in the Supabase Dashboard.
|
||||
Otherwise, use the [Grafana Cloud integration](/docs/guides/observability/metrics/grafana-cloud#installation) available in the Supabase Dashboard.
|
||||
|
||||
</Admonition>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -12,7 +12,7 @@ subtitle: 'This documentation covers frequently asked questions around subscript
|
||||
### What are organizations and projects?
|
||||
|
||||
The Supabase Platform has "organizations" and "projects". An organization may contain multiple projects. Each project is a dedicated Supabase instance with all of its sub-services including Storage, Auth, Functions and Realtime.
|
||||
Each organization only has a single subscription with a single plan (Free, Pro, Team or Enterprise). Project add-ons such as [Compute](/docs/guides/platform/compute-and-disk), [IPv4](/docs/guides/platform/ipv4-address), [Log Drains](/docs/guides/monitoring-and-debugging/log-drains), [Advanced MFA](/docs/guides/auth/auth-mfa/phone), [Custom Domains](/docs/guides/platform/custom-domains) and [PITR](/docs/guides/platform/backups#point-in-time-recovery) are configured per project and are added to your organization subscription.
|
||||
Each organization only has a single subscription with a single plan (Free, Pro, Team or Enterprise). Project add-ons such as [Compute](/docs/guides/platform/compute-and-disk), [IPv4](/docs/guides/platform/ipv4-address), [Log Drains](/docs/guides/observability/log-drains), [Advanced MFA](/docs/guides/auth/auth-mfa/phone), [Custom Domains](/docs/guides/platform/custom-domains) and [PITR](/docs/guides/platform/backups#point-in-time-recovery) are configured per project and are added to your organization subscription.
|
||||
|
||||
Read more on [About billing on Supabase](/docs/guides/platform/billing-on-supabase#organization-based-billing).
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ While your subscription plan applies to your entire organization and is charged
|
||||
- [Compute](/docs/guides/platform/compute-and-disk#compute) to scale your database up to 64 cores and 256 GB RAM
|
||||
- [Read Replicas](/docs/guides/platform/read-replicas) to scale read operations and provide resiliency
|
||||
- [Disk](/docs/guides/platform/compute-and-disk#disk) to provision extra IOPS/throughput or use a high-performance SSD
|
||||
- [Log Drains](/docs/guides/monitoring-and-debugging/log-drains) to sync Supabase logs to a logging system of your choice
|
||||
- [Log Drains](/docs/guides/observability/log-drains) to sync Supabase logs to a logging system of your choice
|
||||
- [Custom Domains](/docs/guides/platform/custom-domains) to provide a branded experience
|
||||
- [PITR](/docs/guides/platform/backups#point-in-time-recovery) to roll back to any specific point in time, down to the minute
|
||||
- [IPv4](/docs/guides/platform/ipv4-address) for a dedicated IPv4 address
|
||||
|
||||
@@ -8,7 +8,7 @@ The Supabase platform automatically optimizes your Postgres database to take adv
|
||||
|
||||
## Examining query performance
|
||||
|
||||
Unoptimized queries are a major cause of poor database performance. To analyze the performance of your queries, see [Inspect the database](/docs/guides/monitoring-and-debugging/inspect).
|
||||
Unoptimized queries are a major cause of poor database performance. To analyze the performance of your queries, see [Inspect the database](/docs/guides/observability/inspect).
|
||||
|
||||
## Optimizing the number of connections
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ title: 'Postgres connection logging'
|
||||
description: 'Enable or disable Postgres connection logging for audit and compliance.'
|
||||
---
|
||||
|
||||
For security monitoring and compliance audits, Postgres can log connection lifecycle events to your project's [Postgres logs](/docs/guides/monitoring-and-debugging/logs#postgres), including events such as `connection received`, `connection authenticated`, and `connection authorized`.
|
||||
For security monitoring and compliance audits, Postgres can log connection lifecycle events to your project's [Postgres logs](/docs/guides/observability/logs#postgres), including events such as `connection received`, `connection authenticated`, and `connection authorized`.
|
||||
|
||||
## Default behavior
|
||||
|
||||
@@ -28,7 +28,7 @@ Connection logging supports audit and monitoring controls required by some compl
|
||||
- **HIPAA** — High-compliance projects should keep connection logging enabled. See the [shared responsibility model for healthcare data](/docs/guides/deployment/shared-responsibility-model#managing-healthcare-data) and [HIPAA compliance guide](/docs/guides/security/hipaa-compliance).
|
||||
- **SOC 2** — Users who need connection audit evidence should enable logging and retain logs according to their own policies. See the [SOC 2 compliance guide](/docs/guides/security/soc-2-compliance).
|
||||
|
||||
Disabling connection logging does not affect other Supabase logging (for example, [Platform Audit Logs](/docs/guides/security/platform-audit-logs), [Auth Audit Logs](/docs/guides/auth/audit-logs), or [pgAudit](/docs/guides/monitoring-and-debugging/advanced-log-filtering#configuring-pgauditlog)).
|
||||
Disabling connection logging does not affect other Supabase logging (for example, [Platform Audit Logs](/docs/guides/security/platform-audit-logs), [Auth Audit Logs](/docs/guides/auth/audit-logs), or [pgAudit](/docs/guides/observability/advanced-log-filtering#configuring-pgauditlog)).
|
||||
|
||||
## Manage connection logging via the dashboard
|
||||
|
||||
@@ -38,7 +38,7 @@ Ensure that you have [Owner or Admin permissions](/docs/guides/platform/access-c
|
||||
|
||||
<Admonition type="note">
|
||||
|
||||
Connection events appear in [Postgres logs](/docs/guides/monitoring-and-debugging/logs#postgres). They are included by default when the Postgres log type is selected. Clear **Connection logs** under Postgres to hide them.
|
||||
Connection events appear in [Postgres logs](/docs/guides/observability/logs#postgres). They are included by default when the Postgres log type is selected. Clear **Connection logs** under Postgres to hide them.
|
||||
|
||||
</Admonition>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ Target organization - the organization you want to move the project to
|
||||
|
||||
## Usage-billing and project add-ons
|
||||
|
||||
For usage metrics such as disk size, egress or image transformations and project add-ons such as [Compute Add-On](/docs/guides/platform/compute-and-disk), [Point-In-Time-Recovery](/docs/guides/platform/backups#point-in-time-recovery), [IPv4](/docs/guides/platform/ipv4-address), [Log Drains](/docs/guides/monitoring-and-debugging/log-drains), [Advanced MFA](/docs/guides/auth/auth-mfa/phone) or a [Custom Domain](/docs/guides/platform/custom-domains), the source organization will still be charged for the usage up until the transfer. The charges will be added to the invoice when the billing cycle resets.
|
||||
For usage metrics such as disk size, egress or image transformations and project add-ons such as [Compute Add-On](/docs/guides/platform/compute-and-disk), [Point-In-Time-Recovery](/docs/guides/platform/backups#point-in-time-recovery), [IPv4](/docs/guides/platform/ipv4-address), [Log Drains](/docs/guides/observability/log-drains), [Advanced MFA](/docs/guides/auth/auth-mfa/phone) or a [Custom Domain](/docs/guides/platform/custom-domains), the source organization will still be charged for the usage up until the transfer. The charges will be added to the invoice when the billing cycle resets.
|
||||
|
||||
The target organization will be charged at the end of the billing cycle for usage after the project transfer.
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ When a Read Replica is deployed, it emits logs from the following services:
|
||||
- [PostgREST](/dashboard/project/_/logs/postgrest-logs)
|
||||
- [Supavisor](/dashboard/project/_/logs/pooler-logs)
|
||||
|
||||
Single-service [log collections](/docs/guides/monitoring-and-debugging/logs#single-service-collections) filter by database, with the Primary database displayed by default. Switch databases with the **Source** control.
|
||||
Single-service [log collections](/docs/guides/observability/logs#single-service-collections) filter by database, with the Primary database displayed by default. Switch databases with the **Source** control.
|
||||
|
||||
For API logs, logs can originate from the API Load Balancer as well. The upstream database or the one that eventually handles the request can be found under the `Redirect Identifier` field. This is equivalent to `metadata.load_balancer_redirect_identifier` when querying the underlying logs.
|
||||
|
||||
@@ -160,7 +160,7 @@ For API logs, logs can originate from the API Load Balancer as well. The upstrea
|
||||
|
||||
Observability and metrics for Read Replicas are available on the Supabase Dashboard. Resource utilization for a specific Read Replica can be viewed on the [Database Reports page](/dashboard/project/_/observability/database) by toggling for `Source`. Likewise, metrics on API requests going through either a Read Replica or Load Balancer API endpoint are also available on the dashboard through the [API Reports page](/dashboard/project/_/observability/api-overview)
|
||||
|
||||
We recommend ingesting your [project's metrics](/docs/guides/monitoring-and-debugging/metrics) into your own environment. If you have an existing ingestion pipeline set up for your project, you can [update it](https://github.com/supabase/supabase-grafana?tab=readme-ov-file#read-replica-support) to additionally ingest metrics from your Read Replicas.
|
||||
We recommend ingesting your [project's metrics](/docs/guides/observability/metrics) into your own environment. If you have an existing ingestion pipeline set up for your project, you can [update it](https://github.com/supabase/supabase-grafana?tab=readme-ov-file#read-replica-support) to additionally ingest metrics from your Read Replicas.
|
||||
|
||||
### Centralized configuration management
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ There is no single threshold to indicate when you should address replication lag
|
||||
|
||||
<Admonition type="note">
|
||||
|
||||
If you are already ingesting your [project's metrics](/docs/guides/monitoring-and-debugging/metrics) into your own environment, you can also keep track of replication lag and set alarms with the `physical_replication_lag_physical_replica_lag_seconds` metric.
|
||||
If you are already ingesting your [project's metrics](/docs/guides/observability/metrics) into your own environment, you can also keep track of replication lag and set alarms with the `physical_replication_lag_physical_replica_lag_seconds` metric.
|
||||
|
||||
</Admonition>
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ height={625}
|
||||
| Check logs | Investigate replication errors or performance issues in your project dashboard | [Realtime Logs Dashboard](/dashboard/project/_/database/realtime-logs) |
|
||||
| Monitor database | Review database resource utilization, connection counts, and query performance that may affect replication | [Database Observability Dashboard](/dashboard/project/_/observability/database) |
|
||||
| Review replication metrics | Use `pg_stat_subscription`, `pg_replication_slots`, and other Postgres views to diagnose replication issues | [manual replication monitoring guide](/docs/guides/database/replication/manual-replication-monitoring) |
|
||||
| Debug database issues | Use CLI inspection tools to identify bloat, lock contention, and long-running queries affecting replication | [Inspect the database](/docs/guides/monitoring-and-debugging/inspect) |
|
||||
| Debug database issues | Use CLI inspection tools to identify bloat, lock contention, and long-running queries affecting replication | [Inspect the database](/docs/guides/observability/inspect) |
|
||||
| Optimize performance | Optimize query performance and connection management to reduce database load | [Performance Tuning Guide](/docs/guides/platform/performance) |
|
||||
| Configure timeouts | Configure statement timeouts to prevent long-running transactions from blocking replication | [Database Timeouts Guide](/docs/guides/database/postgres/timeouts) |
|
||||
| Learn broadcast from DB | Understand how broadcast from database works and best practices for implementation | [Broadcast from Database Guide](/docs/guides/realtime/broadcast#trigger-broadcast-messages-from-your-database) |
|
||||
|
||||
@@ -46,7 +46,7 @@ Each Supabase user account also has access to [Account Audit logs](/dashboard/ac
|
||||
|
||||
## Accessing Audit Log Drains
|
||||
|
||||
Audit Log Drains can be configured under your [organization's audit log drains](/dashboard/org/_/audit-log-drains). For setup instructions and supported destinations, see the [Log Drains guide](/docs/guides/monitoring-and-debugging/log-drains).
|
||||
Audit Log Drains can be configured under your [organization's audit log drains](/dashboard/org/_/audit-log-drains). For setup instructions and supported destinations, see the [Log Drains guide](/docs/guides/observability/log-drains).
|
||||
|
||||
## Limitations
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ description: 'Learn how Supabase Storage caches objects with a CDN.'
|
||||
sidebar_label: 'CDN'
|
||||
---
|
||||
|
||||
Cache hits can be determined via the `log_attributes['response.headers.cf_cache_status']` key in [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering#logs-explorer). Any value that corresponds to either `HIT`, `STALE`, `REVALIDATED`, or `UPDATING` is categorized as a cache hit.
|
||||
Cache hits can be determined via the `log_attributes['response.headers.cf_cache_status']` key in [Query and filter logs](/docs/guides/observability/advanced-log-filtering#logs-explorer). Any value that corresponds to either `HIT`, `STALE`, `REVALIDATED`, or `UPDATING` is categorized as a cache hit.
|
||||
The following example query will show the top cache misses from the `edge_logs`:
|
||||
|
||||
```sql
|
||||
|
||||
@@ -11,7 +11,7 @@ For more advanced filtering needs, use the [SQL Editor](/dashboard/project/_/sql
|
||||
|
||||
<Admonition type="note">
|
||||
|
||||
For more details on filtering the log tables, see [Query and filter logs](/docs/guides/monitoring-and-debugging/advanced-log-filtering)
|
||||
For more details on filtering the log tables, see [Query and filter logs](/docs/guides/observability/advanced-log-filtering)
|
||||
|
||||
</Admonition>
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ limit 100;
|
||||
|
||||
The most useful fields for debugging are:
|
||||
|
||||
> NOTE: not every field is included below. For a full list, check the API Gateway and Function Edge [logs field reference](/docs/guides/monitoring-and-debugging/log-field-reference).
|
||||
> NOTE: not every field is included below. For a full list, check the API Gateway and Function Edge [logs field reference](/docs/guides/observability/log-field-reference).
|
||||
|
||||
### Request object
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Running out of Disk IO Budget means that your instance is using more disk than i
|
||||
|
||||
To check your Disk IO Budget on the Supabase Platform, head over to [Database Health in the Observability section](/dashboard/project/_/observability/database).
|
||||
|
||||
It is also possible to monitor your resources and set up alerts using Prometheus/Grafana. With Grafana you will be able to pinpoint potential causes and see more fine-grained metrics like how much of your RAM is used for caching and your Swap usage. Read the [Metrics Guide](/docs/guides/monitoring-and-debugging/metrics) to learn more.
|
||||
It is also possible to monitor your resources and set up alerts using Prometheus/Grafana. With Grafana you will be able to pinpoint potential causes and see more fine-grained metrics like how much of your RAM is used for caching and your Swap usage. Read the [Metrics Guide](/docs/guides/observability/metrics) to learn more.
|
||||
|
||||
## Common reasons for high disk IO usage
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ High RAM usage could come with a range of issues:
|
||||
|
||||
To check your RAM usage on the Supabase Platform, head over to [Database Health in the Observability section](/dashboard/project/_/observability/database).
|
||||
|
||||
It is also possible to monitor your resources and set up alerts using Prometheus/Grafana. With Grafana you will be able to see how much of your RAM is used for caching and you can track other metrics such as your Swap usage. Read the [Metrics Guide](/docs/guides/monitoring-and-debugging/metrics) to learn more.
|
||||
It is also possible to monitor your resources and set up alerts using Prometheus/Grafana. With Grafana you will be able to see how much of your RAM is used for caching and you can track other metrics such as your Swap usage. Read the [Metrics Guide](/docs/guides/observability/metrics) to learn more.
|
||||
|
||||
## Common reasons for high RAM usage
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ High Swap usage can affect your database performance. For example, you might see
|
||||
|
||||
## Monitor your swap
|
||||
|
||||
You can monitor your resources and set up alerts using Prometheus/Grafana. See the [metrics guide](/docs/guides/monitoring-and-debugging/metrics) for more information.
|
||||
You can monitor your resources and set up alerts using Prometheus/Grafana. See the [metrics guide](/docs/guides/observability/metrics) for more information.
|
||||
|
||||
An [example repository](https://github.com/supabase/supabase-grafana) to ingest metrics and visualize them with Grafana is provided in the linked guide, where we maintain a [list of the exported metrics](https://github.com/supabase/supabase-grafana/blob/main/docs/metrics.md).
|
||||
|
||||
|
||||
@@ -43,4 +43,4 @@ Once you are confident there will not be a crash loop, you can review the follow
|
||||
- Continue to monitor your project's [query performance tab](/dashboard/project/_/observability/query-performance) and [enable index advisor](/docs/guides/database/extensions/index_advisor) if you haven't already - especially if there are a lot of select queries.
|
||||
- If after monitoring your changes you still do not notice improvements, consider upgrading compute if you think this level of activity is going to be regular. It will give you more memory overhead to process tasks like this. You can view all compute offerings [here](/dashboard/project/_/settings/infrastructure).
|
||||
|
||||
If you want to effectively monitor your project's performance minute by minute, you can use the [Metrics API](/docs/guides/monitoring-and-debugging/metrics).
|
||||
If you want to effectively monitor your project's performance minute by minute, you can use the [Metrics API](/docs/guides/observability/metrics).
|
||||
+1
-1
@@ -23,4 +23,4 @@ Review the appropriate guides based on your scenario:
|
||||
- [High Disk I/O](/docs/guides/troubleshooting/exhaust-disk-io)
|
||||
- [Query optimization](/docs/guides/database/query-optimization)
|
||||
|
||||
You can also set up alerts using a [Prometheus endpoint / Grafana charts](/docs/guides/monitoring-and-debugging/metrics) to monitor vital resources.
|
||||
You can also set up alerts using a [Prometheus endpoint / Grafana charts](/docs/guides/observability/metrics) to monitor vital resources.
|
||||
@@ -7,7 +7,7 @@ keywords = [ "grafana", "docker", "metrics", "configuration" ]
|
||||
database_id = "76a4099e-450f-4b5b-a539-224760348c18"
|
||||
---
|
||||
|
||||
This guide is for identifying configuration mistakes in [self-hosted Supabase Grafana installations](/docs/guides/monitoring-and-debugging/metrics/grafana-self-hosted)
|
||||
This guide is for identifying configuration mistakes in [self-hosted Supabase Grafana installations](/docs/guides/observability/metrics/grafana-self-hosted)
|
||||
|
||||
## Step 1: Ping your Grafana endpoint
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ You can check your CPU usage directly on the Supabase Platform. For this go to d
|
||||
|
||||

|
||||
|
||||
It is also possible to monitor your resources and set up alerts using Prometheus/Grafana. You can find a guide for this [here](/docs/guides/monitoring-and-debugging/metrics).
|
||||
It is also possible to monitor your resources and set up alerts using Prometheus/Grafana. You can find a guide for this [here](/docs/guides/observability/metrics).
|
||||
|
||||
## Common reasons for high CPU usage
|
||||
|
||||
|
||||
+1
-1
@@ -391,5 +391,5 @@ To see the default types of events that are logged, you can check this [guide](h
|
||||
- [Debugging with the DB API logs](https://github.com/orgs/supabase/discussions/22849)
|
||||
- [Debugging Database Functions](/docs/guides/database/functions#debugging-functions)
|
||||
- [pg_audit](/docs/guides/database/extensions/pgaudit)
|
||||
- [Supabase Logging](/docs/guides/monitoring-and-debugging/logs)
|
||||
- [Supabase Logging](/docs/guides/observability/logs)
|
||||
- [Self-Hosting Logs](/docs/reference/self-hosting-analytics/introduction)
|
||||
@@ -7,6 +7,6 @@ keywords = [ "metrics", "grafana", "monitoring" ]
|
||||
database_id = "da2d95e5-abc5-47c8-8389-1554d12abf91"
|
||||
---
|
||||
|
||||
To monitor real-time metrics of your database, like CPU, EBS, active database connections, and memory usage, you can deploy a Grafana Dashboard. Check our [GitHub repo](https://github.com/supabase/supabase-grafana) for setup instructions for local or free [Fly.io](http://fly.io/) deployments. Refer to our concise [documentation](/docs/guides/monitoring-and-debugging/metrics) to learn more about the metrics endpoint.
|
||||
To monitor real-time metrics of your database, like CPU, EBS, active database connections, and memory usage, you can deploy a Grafana Dashboard. Check our [GitHub repo](https://github.com/supabase/supabase-grafana) for setup instructions for local or free [Fly.io](http://fly.io/) deployments. Refer to our concise [documentation](/docs/guides/observability/metrics) to learn more about the metrics endpoint.
|
||||
|
||||
While the [Dashboard's Reports Page](/dashboard/project/_/observability) displays some metric data, it provides hourly averages, not real-time by the second data. However, it offers query metrics, which the Grafana Dashboard does not include.
|
||||
+1
-1
@@ -7,7 +7,7 @@ keywords = [ "cpu", "grafana", "metrics" ]
|
||||
database_id = "ef05da0a-f8bc-44a4-9719-5ae811dba104"
|
||||
---
|
||||
|
||||
> [Guide](/docs/guides/monitoring-and-debugging/metrics/grafana-self-hosted) for setting up Supabase Grafana
|
||||
> [Guide](/docs/guides/observability/metrics/grafana-self-hosted) for setting up Supabase Grafana
|
||||
|
||||
## CPU
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ keywords = [ "io", "disk", "database", "grafana" ]
|
||||
database_id = "0056cd40-df04-4045-bbfb-c245cb15b85d"
|
||||
---
|
||||
|
||||
> [Supabase Grafana Installation Guide](/docs/guides/monitoring-and-debugging/metrics/grafana-self-hosted)
|
||||
> [Supabase Grafana Installation Guide](/docs/guides/observability/metrics/grafana-self-hosted)
|
||||
|
||||
There are two primary values that matter for IO:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ _Visual of Grafana Dashboard_
|
||||
|
||||
It can be run locally within Docker. Alternatively, you can deploy it to fly.io or Grafana Cloud, which are better for long-term data collection.
|
||||
|
||||
Installation instructions can be found in it the [metrics docs ](/docs/guides/monitoring-and-debugging/metrics/grafana-self-hosted)
|
||||
Installation instructions can be found in it the [metrics docs ](/docs/guides/observability/metrics/grafana-self-hosted)
|
||||
|
||||
## Observing connections
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ You can view your concurrent peak connection usage throughout the day at the bot
|
||||
|
||||
Unfortunately, excessive resource strain can slow down or disrupt jobs.
|
||||
|
||||
Go to the [reports page](/dashboard/project/_/observability/database) (or [Supabase Grafana](/docs/guides/monitoring-and-debugging/metrics/grafana-self-hosted) if you have it setup), and check for signs of resource exhaustion. If it's clear your database is under pressure, consider upgrading your compute add-on or following the advice from one of the optimization guides:
|
||||
Go to the [reports page](/dashboard/project/_/observability/database) (or [Supabase Grafana](/docs/guides/observability/metrics/grafana-self-hosted) if you have it setup), and check for signs of resource exhaustion. If it's clear your database is under pressure, consider upgrading your compute add-on or following the advice from one of the optimization guides:
|
||||
|
||||
- [Connections](https://github.com/orgs/supabase/discussions/27141)
|
||||
- [Disk/IO](https://github.com/orgs/supabase/discussions/27003)
|
||||
@@ -150,7 +150,7 @@ order by timestamp desc
|
||||
limit 100;
|
||||
```
|
||||
|
||||
If you're interested in modifying the query, there is an advanced [guide](https://github.com/orgs/supabase/discussions/26224) for navigating the Postgres logs and a general-purpose [one](/docs/guides/monitoring-and-debugging/advanced-log-filtering) for applying filters.
|
||||
If you're interested in modifying the query, there is an advanced [guide](https://github.com/orgs/supabase/discussions/26224) for navigating the Postgres logs and a general-purpose [one](/docs/guides/observability/advanced-log-filtering) for applying filters.
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ Supabase has an [open-source Grafana Repo](https://github.com/supabase/supabase-
|
||||
_Visual of Grafana Dashboard_
|
||||

|
||||
|
||||
It can be run locally within Docker or can be deployed for free to fly.io. Installation instructions can be found in [Supabase's metrics docs](/docs/guides/monitoring-and-debugging/metrics/grafana-self-hosted)
|
||||
It can be run locally within Docker or can be deployed for free to fly.io. Installation instructions can be found in [Supabase's metrics docs](/docs/guides/observability/metrics/grafana-self-hosted)
|
||||
|
||||
### Query optimization through indexes
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ date_created = "2024-06-05"
|
||||
database_id = "179d70f3-1e26-4346-9ee8-d340fad382a3"
|
||||
---
|
||||
|
||||
> [Supabase Grafana Installation Guide](/docs/guides/monitoring-and-debugging/metrics/grafana-self-hosted)
|
||||
> [Supabase Grafana Installation Guide](/docs/guides/observability/metrics/grafana-self-hosted)
|
||||
|
||||
Here are examples of unhealthy memory usage:
|
||||

|
||||
|
||||
@@ -159,7 +159,7 @@ As a rule of thumb, if you're using the DB REST API or multiple app-based "user+
|
||||
|
||||
Connection usage can be monitored with a Supabase Grafana Dashboard. It provides realtime visibility of over 200 database metrics, such as graphs of CPU, EBS, and active direct/pooler connections. It can be extremely useful for monitoring and debugging instances.
|
||||
|
||||
You can check our [GitHub repo](https://github.com/supabase/supabase-grafana) for setup instructions for local deployments or free cloud deployments on [Fly.io](http://fly.io/). Refer to Supabase [documentation](/docs/guides/monitoring-and-debugging/metrics) to learn more about the metrics endpoint.
|
||||
You can check our [GitHub repo](https://github.com/supabase/supabase-grafana) for setup instructions for local deployments or free cloud deployments on [Fly.io](http://fly.io/). Refer to Supabase [documentation](/docs/guides/observability/metrics) to learn more about the metrics endpoint.
|
||||
|
||||
## **Can Supavisor really support a million connections?**
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { setupCommand } from '~/components/HomePageCover.constants'
|
||||
|
||||
/** Embedded AI prompt bodies keyed by `AiPrompt` `id`. */
|
||||
export const aiPrompts = {
|
||||
astrojs: `Help me add Supabase to my Astro project. Create a Supabase project at
|
||||
@@ -265,6 +267,11 @@ database.new and run the instruments table SQL. Then:
|
||||
|
||||
REFERENCE
|
||||
https://supabase.com/docs/guides/getting-started/quickstarts/vue.md`,
|
||||
'monitoring-and-debugging': `Help me monitor and debug my Supabase project. Keep all access read-only. Do the following:
|
||||
1. Install the Supabase CLI globally with \`${setupCommand.installCli}\`.
|
||||
2. Install the Supabase Plugin with \`${setupCommand.installPlugin}\`. The plugin includes the Supabase MCP server.
|
||||
3. Review my project and determine whether Supabase is already initialized. If it is not initialized, run \`${setupCommand.initialize}\`.
|
||||
4. Read https://supabase.com/docs/guides/observability.md and follow it.`,
|
||||
'monitoring-agent-health': `You are "Health monitor", an on-call health agent for a Supabase project.
|
||||
Reach the project only through Supabase MCP in read-only mode.
|
||||
|
||||
@@ -280,7 +287,7 @@ Run once per hour. On each shift:
|
||||
Do not change the project. Be terse. Lead with the suspected cause.
|
||||
|
||||
REFERENCE
|
||||
https://supabase.com/docs/guides/monitoring-and-debugging/automate-with-agents/health.md`,
|
||||
https://supabase.com/docs/guides/observability/detecting.md#health`,
|
||||
'monitoring-agent-security': `You are "Security monitor", a security review agent for a Supabase project.
|
||||
Reach the project only through Supabase MCP in read-only mode.
|
||||
|
||||
@@ -295,7 +302,7 @@ Run once per day. On each review:
|
||||
Do not change the project. If nothing needs review, stay silent.
|
||||
|
||||
REFERENCE
|
||||
https://supabase.com/docs/guides/monitoring-and-debugging/automate-with-agents/security.md`,
|
||||
https://supabase.com/docs/guides/observability/detecting.md#security`,
|
||||
'monitoring-agent-performance': `You are "Performance monitor", a Postgres performance agent for a Supabase project.
|
||||
Reach the project only through Supabase MCP in read-only mode.
|
||||
|
||||
@@ -310,7 +317,7 @@ Run once per hour. On each check:
|
||||
Do not change the project, create indexes, or cancel sessions.
|
||||
|
||||
REFERENCE
|
||||
https://supabase.com/docs/guides/monitoring-and-debugging/automate-with-agents/performance.md`,
|
||||
https://supabase.com/docs/guides/observability/detecting.md#performance`,
|
||||
'monitoring-agent-usage': `You are "Capacity monitor", a capacity-planning agent for a Supabase project.
|
||||
Reach the project only through Supabase MCP in read-only mode.
|
||||
|
||||
@@ -327,7 +334,7 @@ Run once each morning. On each review:
|
||||
Do not change billing, compute, or plan settings.
|
||||
|
||||
REFERENCE
|
||||
https://supabase.com/docs/guides/monitoring-and-debugging/automate-with-agents/usage.md`,
|
||||
https://supabase.com/docs/guides/observability/detecting.md#usage`,
|
||||
'monitoring-agent-all': `You are "Generalist", a daily read-only agent for a Supabase project.
|
||||
|
||||
TOOLS AVAILABLE
|
||||
@@ -452,7 +459,7 @@ or improvements beyond fixing what you found. Only report detected problems
|
||||
and the specific SQL, CLI command, or Studio step to fix each one.
|
||||
|
||||
REFERENCE
|
||||
https://supabase.com/docs/guides/monitoring-and-debugging/automate-with-agents/all.md`,
|
||||
https://supabase.com/docs/guides/observability/automate-with-agents/all.md`,
|
||||
} as const
|
||||
|
||||
export type AiPromptId = keyof typeof aiPrompts
|
||||
@@ -29,10 +29,10 @@ import {
|
||||
import { storageExamples, storageGetStarted, storageResources } from './storage.data'
|
||||
import {
|
||||
telemetryAccessWhat,
|
||||
telemetryAccessWhere,
|
||||
telemetryDebugging,
|
||||
telemetryDetect,
|
||||
telemetryDiagnose,
|
||||
telemetryExport,
|
||||
telemetryHireAgent,
|
||||
telemetryMonitoring,
|
||||
} from './telemetry.data'
|
||||
|
||||
const ALL_GROUPS: readonly ContentListingGroup[] = [
|
||||
@@ -67,11 +67,11 @@ const ALL_GROUPS: readonly ContentListingGroup[] = [
|
||||
storageGetStarted,
|
||||
storageExamples,
|
||||
storageResources,
|
||||
telemetryDebugging,
|
||||
telemetryMonitoring,
|
||||
telemetryAccessWhat,
|
||||
telemetryAccessWhere,
|
||||
telemetryDetect,
|
||||
telemetryDiagnose,
|
||||
telemetryHireAgent,
|
||||
telemetryExport,
|
||||
]
|
||||
|
||||
export const CONTENT_LISTINGS: Readonly<Record<string, ContentListingGroup>> = Object.fromEntries(
|
||||
|
||||
@@ -9,55 +9,55 @@ export const logDrainsDestinations: ContentListingGroup = {
|
||||
{
|
||||
title: 'Custom Endpoint',
|
||||
description: 'Forward logs as a POST request to any custom HTTP endpoint.',
|
||||
href: '/guides/monitoring-and-debugging/log-drains#custom-endpoint',
|
||||
href: '/guides/observability/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/monitoring-and-debugging/log-drains#opentelemetry-otlp',
|
||||
href: '/guides/observability/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/monitoring-and-debugging/log-drains#datadog',
|
||||
href: '/guides/observability/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/monitoring-and-debugging/log-drains#loki',
|
||||
href: '/guides/observability/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/monitoring-and-debugging/log-drains#amazon-s3',
|
||||
href: '/guides/observability/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/monitoring-and-debugging/log-drains#sentry',
|
||||
href: '/guides/observability/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/monitoring-and-debugging/log-drains#axiom',
|
||||
href: '/guides/observability/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/monitoring-and-debugging/log-drains#last9',
|
||||
href: '/guides/observability/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/monitoring-and-debugging/log-drains#syslog',
|
||||
href: '/guides/observability/log-drains#syslog',
|
||||
icon: { kind: 'server', color: '#64748B', bg: 'rgba(100,116,139,0.1)' },
|
||||
},
|
||||
],
|
||||
|
||||
@@ -2,141 +2,62 @@ import { monitoringAgents } from '~/data/monitoring-agents.data'
|
||||
import { getScheduleLabel } from '~/data/monitoring-agents.utils'
|
||||
import type { ContentListingGroup } from '~/lib/content-listings.schema'
|
||||
|
||||
export const telemetryDebugging: ContentListingGroup = {
|
||||
id: 'telemetry-debugging',
|
||||
heading: 'Debugging',
|
||||
type: 'grid',
|
||||
columns: 2,
|
||||
items: [
|
||||
{
|
||||
title: 'Debugging guide',
|
||||
href: '/guides/monitoring-and-debugging/debugging',
|
||||
description:
|
||||
'Isolate the failing layer, read logs as evidence, and match symptoms to troubleshooting guides.',
|
||||
},
|
||||
{
|
||||
title: 'Logs',
|
||||
href: '/guides/monitoring-and-debugging/logs',
|
||||
description: 'Inspect project log events in the unified Logs view in Studio.',
|
||||
},
|
||||
{
|
||||
title: 'Query and filter logs',
|
||||
href: '/guides/monitoring-and-debugging/advanced-log-filtering',
|
||||
description: 'Run ClickHouse SQL from Studio, MCP, the API, or a script.',
|
||||
},
|
||||
{
|
||||
title: 'Troubleshooting index',
|
||||
href: '/guides/troubleshooting',
|
||||
description: 'Searchable index of known error codes, symptoms, and fixes.',
|
||||
},
|
||||
{
|
||||
title: 'Diagnosing stuck and blocked queries',
|
||||
href: '/guides/database/connection-management#diagnosing-stuck-and-blocked-queries',
|
||||
description: 'Find sessions blocked by a lock, and cancel or terminate the one responsible.',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export const telemetryMonitoring: ContentListingGroup = {
|
||||
id: 'telemetry-monitoring',
|
||||
heading: 'Monitoring',
|
||||
type: 'grid',
|
||||
columns: 2,
|
||||
items: [
|
||||
{
|
||||
title: 'Log drains',
|
||||
href: '/guides/monitoring-and-debugging/log-drains',
|
||||
description: 'Forward logs to Datadog, Loki, Axiom, S3, or a custom HTTP endpoint.',
|
||||
},
|
||||
{
|
||||
title: 'Reports',
|
||||
href: '/guides/monitoring-and-debugging/reports',
|
||||
description: 'Built-in dashboards for API, Auth, Storage, and Realtime activity.',
|
||||
},
|
||||
{
|
||||
title: 'Metrics',
|
||||
href: '/guides/monitoring-and-debugging/metrics',
|
||||
description: 'Prometheus-compatible database metrics for Grafana and other tools.',
|
||||
},
|
||||
{
|
||||
title: 'Client-side tracing',
|
||||
href: '/guides/monitoring-and-debugging/client-side-tracing',
|
||||
description: 'Correlate browser requests end-to-end using W3C Trace Context.',
|
||||
},
|
||||
{
|
||||
title: 'Query optimization',
|
||||
href: '/guides/database/query-optimization',
|
||||
description: 'Find and fix slow queries using indexes and query plan analysis.',
|
||||
},
|
||||
{
|
||||
title: 'Sentry integration',
|
||||
href: '/guides/monitoring-and-debugging/sentry-monitoring',
|
||||
description: 'Send errors to Sentry for alerting and grouping.',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export const telemetryAccessWhat: ContentListingGroup = {
|
||||
id: 'telemetry-access-what',
|
||||
heading: 'What data you can observe',
|
||||
headingLevel: 'h3',
|
||||
type: 'grid',
|
||||
columns: 2,
|
||||
items: [
|
||||
{
|
||||
title: 'Logs',
|
||||
href: '/guides/monitoring-and-debugging/advanced-log-filtering',
|
||||
href: '/guides/observability/advanced-log-filtering',
|
||||
description:
|
||||
'Query project logs and look up sources and fields. Record extra Postgres, API, and Realtime events.',
|
||||
'Query ClickHouse logs from Studio, MCP, or the API. Filter events in the Logs UI.',
|
||||
},
|
||||
{
|
||||
title: 'Metrics API',
|
||||
href: '/guides/monitoring-and-debugging/metrics',
|
||||
description: 'Scrape Prometheus-compatible database metrics for dashboards and alerting.',
|
||||
href: '/guides/observability/metrics',
|
||||
description: 'Scrape Prometheus-compatible database metrics, or chart a subset in Reports.',
|
||||
},
|
||||
{
|
||||
title: 'Database',
|
||||
href: '/guides/monitoring-and-debugging/inspect',
|
||||
description:
|
||||
'Inspect live Postgres stats such as bloat, cache hit rate, locks, and slow queries.',
|
||||
href: '/guides/observability/inspect',
|
||||
description: 'Inspect live Postgres stats from the CLI, the SQL Editor, or MCP.',
|
||||
},
|
||||
{
|
||||
title: 'Advisors',
|
||||
href: '/guides/monitoring-and-debugging/advisors',
|
||||
description:
|
||||
'Pull deterministic security and performance findings as part of ongoing observability.',
|
||||
href: '/guides/observability/advisors',
|
||||
description: 'Pull security and performance findings from Studio, MCP, the CLI, or the API.',
|
||||
},
|
||||
{
|
||||
title: 'Reports',
|
||||
href: '/guides/observability/reports',
|
||||
description: 'Studio dashboards for API, Auth, Storage, Realtime, and database signals.',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export const telemetryAccessWhere: ContentListingGroup = {
|
||||
id: 'telemetry-access-where',
|
||||
heading: 'Where you can observe it',
|
||||
headingLevel: 'h3',
|
||||
export const telemetryDetect: ContentListingGroup = {
|
||||
id: 'telemetry-detect',
|
||||
type: 'grid',
|
||||
columns: 2,
|
||||
items: [
|
||||
{
|
||||
title: 'MCP',
|
||||
href: '/guides/monitoring-and-debugging/access-data#mcp',
|
||||
title: 'Detect issues',
|
||||
href: '/guides/observability/detecting',
|
||||
description:
|
||||
'Query logs, run read-only SQL, and fetch advisor findings from an agent harness.',
|
||||
'Run health, security, performance, and usage checks against logs and database statistics to pick up a signal.',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export const telemetryDiagnose: ContentListingGroup = {
|
||||
id: 'telemetry-diagnose',
|
||||
type: 'grid',
|
||||
items: [
|
||||
{
|
||||
title: 'API',
|
||||
href: '/guides/monitoring-and-debugging/access-data#api',
|
||||
description: 'Read logs, advisors, and usage counts, or scrape the Metrics API.',
|
||||
},
|
||||
{
|
||||
title: 'CLI',
|
||||
href: '/guides/monitoring-and-debugging/access-data#cli',
|
||||
title: 'Diagnose and resolve',
|
||||
href: '/guides/troubleshooting',
|
||||
description:
|
||||
'Inspect the database and run security or performance advisors from the terminal.',
|
||||
},
|
||||
{
|
||||
title: 'Studio',
|
||||
href: '/guides/monitoring-and-debugging/access-data#studio',
|
||||
description: 'Open Logs, Reports, and Advisors in the browser.',
|
||||
'Use a concrete finding, symptom, or error code to identify the cause and apply a known solution.',
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -148,34 +69,57 @@ export const telemetryHireAgent: ContentListingGroup = {
|
||||
items: [
|
||||
{
|
||||
title: 'Generalist',
|
||||
href: '/guides/monitoring-and-debugging/automate-with-agents/all',
|
||||
href: '/guides/observability/automate-with-agents/all',
|
||||
subtitle: getScheduleLabel(monitoringAgents.all),
|
||||
description:
|
||||
'Run all four checks — health, security, performance, and usage — in one daily pass.',
|
||||
},
|
||||
{
|
||||
title: monitoringAgents.health.name,
|
||||
href: '/guides/monitoring-and-debugging/automate-with-agents/health',
|
||||
href: '/guides/observability/automate-with-agents/health',
|
||||
subtitle: getScheduleLabel(monitoringAgents.health),
|
||||
description: 'Watch logs for 5xx spikes and Auth failures.',
|
||||
},
|
||||
{
|
||||
title: monitoringAgents.security.name,
|
||||
href: '/guides/monitoring-and-debugging/automate-with-agents/security',
|
||||
href: '/guides/observability/automate-with-agents/security',
|
||||
subtitle: getScheduleLabel(monitoringAgents.security),
|
||||
description: 'Review advisor findings and authorization failures.',
|
||||
},
|
||||
{
|
||||
title: monitoringAgents.performance.name,
|
||||
href: '/guides/monitoring-and-debugging/automate-with-agents/performance',
|
||||
href: '/guides/observability/automate-with-agents/performance',
|
||||
subtitle: getScheduleLabel(monitoringAgents.performance),
|
||||
description: 'Find slow queries, lock waits, and missing indexes.',
|
||||
},
|
||||
{
|
||||
title: monitoringAgents.usage.name,
|
||||
href: '/guides/monitoring-and-debugging/automate-with-agents/usage',
|
||||
href: '/guides/observability/automate-with-agents/usage',
|
||||
subtitle: getScheduleLabel(monitoringAgents.usage),
|
||||
description: 'Track request growth, error rates, and approaching limits.',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export const telemetryExport: ContentListingGroup = {
|
||||
id: 'telemetry-export',
|
||||
type: 'grid',
|
||||
columns: 3,
|
||||
items: [
|
||||
{
|
||||
title: 'Log drains',
|
||||
href: '/guides/observability/log-drains',
|
||||
description: 'Send project logs to your own destination.',
|
||||
},
|
||||
{
|
||||
title: 'Client-side tracing',
|
||||
href: '/guides/observability/client-side-tracing',
|
||||
description: 'Propagate W3C trace context from the client through Supabase services.',
|
||||
},
|
||||
{
|
||||
title: 'Sentry integration',
|
||||
href: '/guides/observability/sentry-monitoring',
|
||||
description: 'Capture supabase-js errors and spans in Sentry.',
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -34,7 +34,7 @@ const PUBLISHED_SECTIONS = [
|
||||
'graphql',
|
||||
'integrations',
|
||||
'local-development',
|
||||
'monitoring-and-debugging',
|
||||
'observability',
|
||||
'platform',
|
||||
'queues',
|
||||
'realtime',
|
||||
|
||||
@@ -18,16 +18,32 @@ describe('AiPrompt markdown schema', () => {
|
||||
})
|
||||
|
||||
it.each([
|
||||
['monitoring-agent-health', 'Health monitor'],
|
||||
['monitoring-agent-security', 'Security monitor'],
|
||||
['monitoring-agent-performance', 'Performance monitor'],
|
||||
['monitoring-agent-usage', 'Capacity monitor'],
|
||||
])('serializes the %s agent prompt', (id, persona) => {
|
||||
['monitoring-agent-health', 'Health monitor', 'health'],
|
||||
['monitoring-agent-security', 'Security monitor', 'security'],
|
||||
['monitoring-agent-performance', 'Performance monitor', 'performance'],
|
||||
['monitoring-agent-usage', 'Capacity monitor', 'usage'],
|
||||
])('serializes the %s agent prompt', (id, persona, detectionSection) => {
|
||||
const markdown = AiPrompt({ props: { id, includeInMarkdown: true } })
|
||||
|
||||
expect(markdown).toContain('**AI Prompt**')
|
||||
expect(markdown).toContain(persona)
|
||||
expect(markdown).toContain('read-only')
|
||||
expect(markdown).toContain(
|
||||
`https://supabase.com/docs/guides/observability/detecting.md#${detectionSection}`
|
||||
)
|
||||
expect(markdown).toContain('```text')
|
||||
})
|
||||
|
||||
it('serializes the monitoring overview prompt', () => {
|
||||
const markdown = AiPrompt({
|
||||
props: { id: 'monitoring-and-debugging', includeInMarkdown: true },
|
||||
})
|
||||
|
||||
expect(markdown).toContain('Help me monitor and debug my Supabase project.')
|
||||
expect(markdown).toContain('npm install -g supabase')
|
||||
expect(markdown).toContain('npx plugins add supabase-community/supabase-plugin')
|
||||
expect(markdown).toContain('read-only')
|
||||
expect(markdown).toContain('https://supabase.com/docs/guides/observability.md')
|
||||
expect(markdown).toContain('```text')
|
||||
})
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ const levelsData = {
|
||||
},
|
||||
telemetry: {
|
||||
icon: 'telemetry',
|
||||
name: 'Telemetry',
|
||||
name: 'Observability',
|
||||
},
|
||||
realtime: {
|
||||
icon: 'realtime',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { resolveBreadcrumbs } from './breadcrumbs'
|
||||
|
||||
describe('resolveBreadcrumbs', () => {
|
||||
it('places troubleshooting under detect and diagnose', () => {
|
||||
expect(resolveBreadcrumbs('/guides/troubleshooting')).toEqual([
|
||||
{
|
||||
name: 'Observability',
|
||||
url: '/guides/observability',
|
||||
},
|
||||
{ name: 'Detect and diagnose' },
|
||||
{ name: 'Diagnosing', url: '/guides/troubleshooting' },
|
||||
])
|
||||
})
|
||||
})
|
||||
@@ -26,7 +26,7 @@ const SECTION_PATH_TO_KEY: Record<string, keyof typeof NavItems> = {
|
||||
security: 'security',
|
||||
'self-hosting': 'self_hosting',
|
||||
storage: 'storage',
|
||||
'monitoring-and-debugging': 'telemetry',
|
||||
observability: 'telemetry',
|
||||
}
|
||||
|
||||
function getSectionMenu(pathname: string) {
|
||||
@@ -55,7 +55,14 @@ function findMenuItemByUrl(
|
||||
|
||||
export function resolveBreadcrumbs(pathname: string): BreadcrumbItem[] {
|
||||
if (pathname.startsWith('/guides/troubleshooting')) {
|
||||
return [{ name: 'Troubleshooting', url: '/guides/troubleshooting' }]
|
||||
return [
|
||||
{
|
||||
name: 'Observability',
|
||||
url: '/guides/observability',
|
||||
},
|
||||
{ name: 'Detect and diagnose' },
|
||||
{ name: 'Diagnosing', url: '/guides/troubleshooting' },
|
||||
]
|
||||
}
|
||||
if (pathname.startsWith('/guides/getting-started/ai-prompts')) {
|
||||
return [
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('serializeContentListingGroupToMarkdown', () => {
|
||||
items: [
|
||||
{
|
||||
title: 'Health monitor',
|
||||
href: '/guides/monitoring-and-debugging/automate-with-agents/health',
|
||||
href: '/guides/observability/automate-with-agents/health',
|
||||
subtitle: 'Every 15 minutes',
|
||||
description: 'Watch logs for 5xx spikes and Auth failures.',
|
||||
},
|
||||
@@ -79,7 +79,7 @@ describe('serializeContentListingGroupToMarkdown', () => {
|
||||
)
|
||||
|
||||
expect(markdown).toContain(
|
||||
'**[Health monitor](https://supabase.com/docs/guides/monitoring-and-debugging/automate-with-agents/health):** Every 15 minutes. Watch logs for 5xx spikes and Auth failures.'
|
||||
'**[Health monitor](https://supabase.com/docs/guides/observability/automate-with-agents/health):** Every 15 minutes. Watch logs for 5xx spikes and Auth failures.'
|
||||
)
|
||||
})
|
||||
|
||||
@@ -278,7 +278,7 @@ describe('dashboard content listing hrefs', () => {
|
||||
describe('contentListingItemSchema icon', () => {
|
||||
const baseItem = {
|
||||
title: 'Datadog',
|
||||
href: '/guides/monitoring-and-debugging/log-drains#datadog',
|
||||
href: '/guides/observability/log-drains#datadog',
|
||||
description: 'Stream logs directly into Datadog for monitoring and analysis.',
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ const nextConfig = {
|
||||
},
|
||||
{
|
||||
source: '/guides/database/database-advisors',
|
||||
destination: '/guides/monitoring-and-debugging/advisors',
|
||||
destination: '/guides/observability/advisors',
|
||||
permanent: true,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -140,7 +140,7 @@ export async function fetchCliLibReferenceSource() {
|
||||
export async function fetchLintWarningsGuideSources() {
|
||||
return new LintWarningsGuideLoader(
|
||||
'guide',
|
||||
'/guides/monitoring-and-debugging/advisors',
|
||||
'/guides/observability/advisors',
|
||||
'supabase',
|
||||
'splinter',
|
||||
'main',
|
||||
|
||||
@@ -95,7 +95,7 @@ export const LintDetail = ({
|
||||
<Link
|
||||
href={
|
||||
lintInfoMap.find((item) => item.name === lint.name)?.docsLink ||
|
||||
`${DOCS_URL}/guides/database/database-linter`
|
||||
`${DOCS_URL}/guides/observability/advisors`
|
||||
}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
|
||||
@@ -33,7 +33,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/indexes?schema=${encodeURIComponent(metadata?.schema ?? '')}`,
|
||||
linkText: 'Create an index',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0001_unindexed_foreign_keys`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0001_unindexed_foreign_keys`,
|
||||
category: 'performance',
|
||||
},
|
||||
{
|
||||
@@ -42,7 +42,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
icon: <Lock className="text-foreground-muted" size={15} strokeWidth={1.5} />,
|
||||
link: ({ projectRef }) => `/project/${projectRef}/editor`,
|
||||
linkText: 'View table',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0002_auth_users_exposed`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0002_auth_users_exposed`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -51,7 +51,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1} />,
|
||||
link: ({ projectRef }) => `/project/${projectRef}/database/policies`,
|
||||
linkText: 'View policies',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0003_auth_rls_initplan`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0003_auth_rls_initplan`,
|
||||
category: 'performance',
|
||||
},
|
||||
{
|
||||
@@ -60,7 +60,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1} />,
|
||||
link: ({ projectRef }) => `/project/${projectRef}/editor`,
|
||||
linkText: 'View table',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0004_no_primary_key`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0004_no_primary_key`,
|
||||
category: 'performance',
|
||||
},
|
||||
{
|
||||
@@ -70,7 +70,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/indexes?schema=${encodeURIComponent(metadata?.schema ?? '')}&table=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View index',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0005_unused_index`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0005_unused_index`,
|
||||
category: 'performance',
|
||||
},
|
||||
{
|
||||
@@ -80,7 +80,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/policies?schema=${encodeURIComponent(metadata?.schema ?? '')}&search=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View policies',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0006_multiple_permissive_policies`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0006_multiple_permissive_policies`,
|
||||
category: 'performance',
|
||||
},
|
||||
{
|
||||
@@ -90,7 +90,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/policies?schema=${encodeURIComponent(metadata?.schema ?? '')}&search=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View policies',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0007_policy_exists_rls_disabled`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0007_policy_exists_rls_disabled`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -100,7 +100,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/policies?schema=${encodeURIComponent(metadata?.schema ?? '')}&search=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View table',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0008_rls_enabled_no_policy`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0008_rls_enabled_no_policy`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -110,7 +110,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/indexes?schema=${encodeURIComponent(metadata?.schema ?? '')}&table=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View index',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0009_duplicate_index`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0009_duplicate_index`,
|
||||
category: 'performance',
|
||||
},
|
||||
{
|
||||
@@ -118,9 +118,9 @@ export const lintInfoMap: LintInfo[] = [
|
||||
title: 'Security Definer View',
|
||||
icon: <Eye className="text-foreground-muted" size={15} strokeWidth={1.5} />,
|
||||
link: () =>
|
||||
`${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0010_security_definer_view`,
|
||||
`${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0010_security_definer_view`,
|
||||
linkText: 'View docs',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0010_security_definer_view`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0010_security_definer_view`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -130,7 +130,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/functions?schema=${encodeURIComponent(metadata?.schema ?? '')}&search=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View functions',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0011_function_search_path_mutable`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0011_function_search_path_mutable`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -139,7 +139,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
icon: <User className="text-foreground-muted" size={15} strokeWidth={1} />,
|
||||
link: ({ projectRef }) => `/project/${projectRef}/auth/providers`,
|
||||
linkText: 'View settings',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0012_auth_allow_anonymous_sign_ins`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0012_auth_allow_anonymous_sign_ins`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -149,7 +149,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/policies?schema=${encodeURIComponent(metadata?.schema ?? '')}&search=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View policies',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0013_rls_disabled_in_public`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0013_rls_disabled_in_public`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -159,7 +159,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/extensions?filter=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View extension',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0014_extension_in_public`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0014_extension_in_public`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -195,26 +195,25 @@ export const lintInfoMap: LintInfo[] = [
|
||||
icon: <User className="text-foreground-muted" size={15} strokeWidth={1} />,
|
||||
link: ({ projectRef }) => `/project/${projectRef}/database/policies`,
|
||||
linkText: 'View policies',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?queryGroups=lint&lint=0015_rls_references_user_metadata`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?queryGroups=lint&lint=0015_rls_references_user_metadata`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
name: 'materialized_view_in_api',
|
||||
title: 'Materialized View in API',
|
||||
icon: <Eye className="text-foreground-muted" size={15} strokeWidth={1.5} />,
|
||||
link: () =>
|
||||
`${DOCS_URL}/guides/monitoring-and-debugging/advisors?lint=0016_materialized_view_in_api`,
|
||||
link: () => `${DOCS_URL}/guides/observability/advisors?lint=0016_materialized_view_in_api`,
|
||||
linkText: 'View docs',
|
||||
docsLink: `${DOCS_URL}/guides/monitoring-and-debugging/advisors?lint=0016_materialized_view_in_api`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0016_materialized_view_in_api`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
name: 'foreign_table_in_api',
|
||||
title: 'Foreign Table in API',
|
||||
icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1.5} />,
|
||||
link: () => `${DOCS_URL}/guides/database/database-linter?lint=0017_foreign_table_in_api`,
|
||||
link: () => `${DOCS_URL}/guides/observability/advisors?lint=0017_foreign_table_in_api`,
|
||||
linkText: 'View docs',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0017_foreign_table_in_api`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0017_foreign_table_in_api`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -222,9 +221,9 @@ export const lintInfoMap: LintInfo[] = [
|
||||
title: 'Unsupported reg types',
|
||||
icon: <Table2 className="text-foreground-muted" size={15} strokeWidth={1.5} />,
|
||||
link: () =>
|
||||
`${DOCS_URL}/guides/monitoring-and-debugging/advisors?lint=0018_unsupported_reg_types&queryGroups=lint`,
|
||||
`${DOCS_URL}/guides/observability/advisors?lint=0018_unsupported_reg_types&queryGroups=lint`,
|
||||
linkText: 'View docs',
|
||||
docsLink: `${DOCS_URL}/guides/monitoring-and-debugging/advisors?lint=0018_unsupported_reg_types&queryGroups=lint`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0018_unsupported_reg_types&queryGroups=lint`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -334,7 +333,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/editor?schema=${encodeURIComponent(metadata?.schema ?? '')}&table=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View table',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0023_sensitive_columns_exposed`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0023_sensitive_columns_exposed`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -344,7 +343,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/policies?schema=${encodeURIComponent(metadata?.schema ?? '')}&search=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View policies',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0024_permissive_rls_policy`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0024_permissive_rls_policy`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -356,7 +355,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
return `/project/${projectRef}/storage/files/buckets/${encodeURIComponent(bucketId ?? metadata?.name ?? '')}`
|
||||
},
|
||||
linkText: 'View bucket',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0025_public_bucket_allows_listing`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0025_public_bucket_allows_listing`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -366,7 +365,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/editor?schema=${encodeURIComponent(metadata?.schema ?? '')}&table=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View object',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0026_pg_graphql_anon_table_exposed`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0026_pg_graphql_anon_table_exposed`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -376,7 +375,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/editor?schema=${encodeURIComponent(metadata?.schema ?? '')}&table=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View object',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0027_pg_graphql_authenticated_table_exposed`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0027_pg_graphql_authenticated_table_exposed`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -386,7 +385,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/functions?schema=${encodeURIComponent(metadata?.schema ?? '')}&search=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View function',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0028_anon_security_definer_function_executable`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0028_anon_security_definer_function_executable`,
|
||||
category: 'security',
|
||||
},
|
||||
{
|
||||
@@ -396,7 +395,7 @@ export const lintInfoMap: LintInfo[] = [
|
||||
link: ({ projectRef, metadata }) =>
|
||||
`/project/${projectRef}/database/functions?schema=${encodeURIComponent(metadata?.schema ?? '')}&search=${encodeURIComponent(metadata?.name ?? '')}`,
|
||||
linkText: 'View function',
|
||||
docsLink: `${DOCS_URL}/guides/database/database-linter?lint=0029_authenticated_security_definer_function_executable`,
|
||||
docsLink: `${DOCS_URL}/guides/observability/advisors?lint=0029_authenticated_security_definer_function_executable`,
|
||||
category: 'security',
|
||||
},
|
||||
// Health lints report on the running project rather than on schema, so they link to the
|
||||
|
||||
@@ -87,7 +87,7 @@ export const LinterPageFooter = ({
|
||||
<Markdown
|
||||
className="text-xs"
|
||||
content={`The Supabase CLI comes with a range of tools to help inspect your Postgres instances for
|
||||
potential issues. [Learn more here](${DOCS_URL}/guides/monitoring-and-debugging/inspect).`}
|
||||
potential issues. [Learn more here](${DOCS_URL}/guides/observability/inspect).`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ export const WithStatements = ({
|
||||
<Markdown
|
||||
className="text-xs"
|
||||
content={`The Supabase CLI comes with a range of tools to help inspect your Postgres instances for
|
||||
potential issues. [Learn more here](${DOCS_URL}/guides/monitoring-and-debugging/inspect).`}
|
||||
potential issues. [Learn more here](${DOCS_URL}/guides/observability/inspect).`}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,28 +21,28 @@ const ENTITY_TYPE_META: Record<
|
||||
heading: 'Tables without Row Level Security',
|
||||
recommendation: 'Enable RLS on these tables to control access per-row.',
|
||||
docsUrl:
|
||||
'https://supabase.com/docs/guides/database/database-linter?lint=0013_rls_disabled_in_public',
|
||||
'https://supabase.com/docs/guides/observability/advisors?lint=0013_rls_disabled_in_public',
|
||||
},
|
||||
'foreign table': {
|
||||
heading: 'Foreign tables',
|
||||
recommendation:
|
||||
'Foreign tables do not support RLS. Revoke access from the anon and authenticated roles.',
|
||||
docsUrl:
|
||||
'https://supabase.com/docs/guides/database/database-linter?lint=0017_foreign_table_in_api',
|
||||
'https://supabase.com/docs/guides/observability/advisors?lint=0017_foreign_table_in_api',
|
||||
},
|
||||
'materialized view': {
|
||||
heading: 'Materialized views',
|
||||
recommendation:
|
||||
'Materialized views do not support RLS. Revoke access from the anon and authenticated roles.',
|
||||
docsUrl:
|
||||
'https://supabase.com/docs/guides/database/database-linter?lint=0016_materialized_view_in_api',
|
||||
'https://supabase.com/docs/guides/observability/advisors?lint=0016_materialized_view_in_api',
|
||||
},
|
||||
view: {
|
||||
heading: 'Views without SECURITY INVOKER',
|
||||
recommendation:
|
||||
'These views run with the permissions of the view creator, not the querying user. Set SECURITY INVOKER to enforce caller permissions.',
|
||||
docsUrl:
|
||||
'https://supabase.com/docs/guides/database/database-linter?lint=0010_security_definer_view',
|
||||
'https://supabase.com/docs/guides/observability/advisors?lint=0010_security_definer_view',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -371,11 +371,11 @@ export const PG_BEST_PRACTICES = `
|
||||
- After creating a table, check and configure Data API access and RLS before use (see the "Exposing a Table to the Data API" section in RLS knowledge for the full workflow).
|
||||
- Define foreign key references within the \`CREATE TABLE\` statement.
|
||||
- Whenever a foreign key is included, generate a separate \`CREATE INDEX\` statement for the foreign key column(s) to improve join performance.
|
||||
- **Foreign Tables:** Place foreign tables in a schema named \`private\` (create the schema if needed). Explain the security risk (RLS bypass) and include a link: https://supabase.com/docs/guides/monitoring-and-debugging/advisors?queryGroups=lint&lint=0017_foreign_table_in_api.
|
||||
- **Foreign Tables:** Place foreign tables in a schema named \`private\` (create the schema if needed). Explain the security risk (RLS bypass) and include a link: https://supabase.com/docs/guides/observability/advisors?queryGroups=lint&lint=0017_foreign_table_in_api.
|
||||
|
||||
### Views
|
||||
- Add \`with (security_invoker=on)\` immediately after \`CREATE VIEW view_name\`.
|
||||
- **Materialized Views:** Store materialized views in the \`private\` schema (create if needed). Explain the security risk (RLS bypass) and reference: https://supabase.com/docs/guides/monitoring-and-debugging/advisors?queryGroups=lint&lint=0016_materialized_view_in_api.
|
||||
- **Materialized Views:** Store materialized views in the \`private\` schema (create if needed). Explain the security risk (RLS bypass) and reference: https://supabase.com/docs/guides/observability/advisors?queryGroups=lint&lint=0016_materialized_view_in_api.
|
||||
|
||||
### Extensions
|
||||
- Always install extensions in the \`extensions\` schema or a dedicated schema; never in \`public\`.
|
||||
|
||||
@@ -92,7 +92,7 @@ const MOCK_ADVISORIES_DATA = [
|
||||
category: 'security',
|
||||
message: 'Materialized views in API schema can bypass RLS. Move them to private schema.',
|
||||
remediationUrl:
|
||||
'https://supabase.com/docs/guides/monitoring-and-debugging/advisors?queryGroups=lint&lint=0016_materialized_view_in_api',
|
||||
'https://supabase.com/docs/guides/observability/advisors?queryGroups=lint&lint=0016_materialized_view_in_api',
|
||||
},
|
||||
{
|
||||
id: '0031_functions_no_rls_guard',
|
||||
@@ -100,7 +100,7 @@ const MOCK_ADVISORIES_DATA = [
|
||||
category: 'security',
|
||||
message: 'Function api.health_check should verify auth context before querying tables.',
|
||||
remediationUrl:
|
||||
'https://supabase.com/docs/guides/monitoring-and-debugging/advisors?queryGroups=lint&lint=0031_functions_no_rls_guard',
|
||||
'https://supabase.com/docs/guides/observability/advisors?queryGroups=lint&lint=0031_functions_no_rls_guard',
|
||||
},
|
||||
{
|
||||
id: '1012_slow_query',
|
||||
|
||||
@@ -73,7 +73,7 @@ const ProjectLints: NextPageWithLayout = () => {
|
||||
<FormHeader
|
||||
className="py-4 px-6 mb-0!"
|
||||
title="Performance Advisor"
|
||||
docsUrl={`${DOCS_URL}/guides/database/database-linter`}
|
||||
docsUrl={`${DOCS_URL}/guides/observability/advisors`}
|
||||
/>
|
||||
<LintPageTabs
|
||||
activeLints={activeLints}
|
||||
|
||||
@@ -76,7 +76,7 @@ const ProjectLints: NextPageWithLayout = () => {
|
||||
<FormHeader
|
||||
className="py-4 px-6 -mb-px!"
|
||||
title="Security Advisor"
|
||||
docsUrl={`${DOCS_URL}/guides/database/database-linter`}
|
||||
docsUrl={`${DOCS_URL}/guides/observability/advisors`}
|
||||
/>
|
||||
<LintPageTabs
|
||||
activeLints={activeLints}
|
||||
|
||||
@@ -27,7 +27,7 @@ Supabase reads the incoming trace context and stamps the same `trace_id` onto th
|
||||
|
||||
## How to set it up
|
||||
|
||||
This walkthrough covers supabase-js. Trace propagation is also available in Swift, Flutter, and Python; see the [docs](https://supabase.com/docs/guides/monitoring-and-debugging/client-side-tracing) for per-language setup and the current list.
|
||||
This walkthrough covers supabase-js. Trace propagation is also available in Swift, Flutter, and Python; see the [docs](https://supabase.com/docs/guides/observability/client-side-tracing) for per-language setup and the current list.
|
||||
|
||||
The SDK doesn't configure OpenTelemetry for you. You bring your own tracer, then tell the client to propagate.
|
||||
|
||||
@@ -90,4 +90,4 @@ Trace propagation is available now in `supabase-js`. Add `import '@supabase/supa
|
||||
|
||||
Already using `tracePropagation` from an earlier release? Upgrade to `supabase-js` 2.112.0 or later and add the `import '@supabase/supabase-js/tracing'` line. Versions 2.106.0 through 2.111.x silently sent no trace headers in bundled apps, so the upgrade is what actually fixes propagation, not just the import.
|
||||
|
||||
Full setup, including the sampling options, is in the [client-side tracing guide](https://supabase.com/docs/guides/monitoring-and-debugging/client-side-tracing).
|
||||
Full setup, including the sampling options, is in the [client-side tracing guide](https://supabase.com/docs/guides/observability/client-side-tracing).
|
||||
@@ -2343,7 +2343,7 @@ The Logs & Analytics feature in Supabase provides users with comprehensive loggi
|
||||
|
||||
OpenTelemetry integration allows you to export logs, metrics, and traces to any OTel-compatible tool—Datadog, Honeycomb, Grafana, or your preferred monitoring platform. The Metrics API exposes ~200 Prometheus-compatible Postgres metrics, including CPU, IO, WAL, connections, and query statistics.
|
||||
|
||||
Trace propagation also works inbound. supabase-js, Swift, Flutter, and Python can propagate W3C Trace Context to Supabase, so a client-side trace and the corresponding Supabase logs share the same trace_id. It is opt-in and works with any W3C-compliant tracer, including OTLP, Sentry, Datadog, Honeycomb, and Grafana. See the [client-side tracing guide](https://supabase.com/docs/guides/monitoring-and-debugging/client-side-tracing) for the latest on supported SDKs and target platforms.
|
||||
Trace propagation also works inbound. supabase-js, Swift, Flutter, and Python can propagate W3C Trace Context to Supabase, so a client-side trace and the corresponding Supabase logs share the same trace_id. It is opt-in and works with any W3C-compliant tracer, including OTLP, Sentry, Datadog, Honeycomb, and Grafana. See the [client-side tracing guide](https://supabase.com/docs/guides/observability/client-side-tracing) for the latest on supported SDKs and target platforms.
|
||||
|
||||
## Key benefits
|
||||
1. Real-Time Monitoring: Access live data on application performance and user interactions to make informed decisions.
|
||||
@@ -2674,7 +2674,7 @@ $60 per drain per project, plus $0.20 per million events and $0.09 per GB egress
|
||||
icon: Activity,
|
||||
products: [ADDITIONAL_PRODUCTS.STUDIO],
|
||||
heroImage: 'https://www.youtube-nocookie.com/embed/A4GFmvgxS-E',
|
||||
docsUrl: 'https://supabase.com/docs/guides/monitoring-and-debugging/log-drains',
|
||||
docsUrl: 'https://supabase.com/docs/guides/observability/log-drains',
|
||||
slug: 'log-drains',
|
||||
status: {
|
||||
stage: PRODUCT_STAGES.GA,
|
||||
|
||||
@@ -143,7 +143,22 @@ module.exports = [
|
||||
{
|
||||
permanent: true,
|
||||
source: '/docs/guides/telemetry/:match*',
|
||||
destination: '/docs/guides/monitoring-and-debugging/:match*',
|
||||
destination: '/docs/guides/observability/:match*',
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
source: '/docs/guides/monitoring-and-debugging/resolve-issues',
|
||||
destination: '/docs/guides/observability/detecting',
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
source: '/docs/guides/monitoring-and-debugging/debugging',
|
||||
destination: '/docs/guides/observability/detecting',
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
source: '/docs/guides/monitoring-and-debugging/:match*',
|
||||
destination: '/docs/guides/observability/:match*',
|
||||
},
|
||||
{
|
||||
permanent: false,
|
||||
@@ -2759,17 +2774,17 @@ module.exports = [
|
||||
{
|
||||
permanent: true,
|
||||
source: '/docs/guides/database/inspect',
|
||||
destination: '/docs/guides/monitoring-and-debugging/inspect',
|
||||
destination: '/docs/guides/observability/inspect',
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
source: '/docs/guides/database/database-linter',
|
||||
destination: '/docs/guides/monitoring-and-debugging/advisors',
|
||||
destination: '/docs/guides/observability/advisors',
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
source: '/docs/guides/database/database-advisors',
|
||||
destination: '/docs/guides/monitoring-and-debugging/advisors',
|
||||
destination: '/docs/guides/observability/advisors',
|
||||
},
|
||||
{
|
||||
permanent: true,
|
||||
|
||||
@@ -28,7 +28,7 @@ test.describe('docs dev runs locally without credentials', () => {
|
||||
test('advisors page renders (full content or graceful fallback, never a crash)', async ({
|
||||
page,
|
||||
}) => {
|
||||
const response = await page.goto('/docs/guides/monitoring-and-debugging/advisors')
|
||||
const response = await page.goto('/docs/guides/observability/advisors')
|
||||
expect(response?.ok(), `expected 200, got ${response?.status()}`).toBeTruthy()
|
||||
|
||||
await expect(page.getByRole('heading', { name: 'Advisors' })).toBeVisible()
|
||||
|
||||
Reference in new issue
Block a user