mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## Context Lots of links that initially go to 301's within docs / kb. Updates these to their resolved target. Ask your Claude Code to review the new destinations programmatically. --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
48 lines
3.0 KiB
Plaintext
48 lines
3.0 KiB
Plaintext
---
|
||
id: 'metrics'
|
||
title: 'Metrics API'
|
||
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.
|
||
|
||
</Admonition>
|
||
|
||
## What you can do with the Metrics API
|
||
|
||
- Stream database CPU, IO, WAL, connection, and query stats into Prometheus-compatible systems.
|
||
- Combine Supabase metrics with application signals in Grafana, Datadog, or any other observability vendor.
|
||
- For Grafana, you can use the [Grafana Cloud integration](/dashboard/project/_/integrations/grafana-cloud/overview?utm_source=metrics-api&utm_medium=docs&utm_campaign=supabase_grafana_cloud_one_click_integration) in the Supabase Dashboard to get a configured instance and prebuilt dashboard in one click.
|
||
- Reuse our [supabase-grafana dashboard JSON](https://github.com/supabase/supabase-grafana) to bootstrap over 200 ready-made charts.
|
||
- Build your own alerting policies (right-sizing, saturation detection, index regression, and more).
|
||
|
||
<$Partial path="metrics_access.mdx" />
|
||
|
||
## Choose your monitoring stack
|
||
|
||
Pick the workflow that best matches your tooling. Cards link to Supabase-authored guides or vendor integration docs, and some include a “Community” pill when there’s an accompanying vendor reference.
|
||
|
||
<MetricsStackCards />
|
||
|
||
<Image
|
||
src="/docs/img/guides/platform/supabase-grafana-prometheus.png"
|
||
alt="Supabase Grafana dashboard showcasing database metrics"
|
||
width="3000"
|
||
height="1509"
|
||
/>
|
||
|
||
## Additional resources
|
||
|
||
- [Supabase Grafana repository](https://github.com/supabase/supabase-grafana) for dashboard JSON and alert examples.
|
||
- [Grafana Cloud integration](/docs/guides/observability/metrics/grafana-cloud) for the one-click setup, plus [Grafana’s integration reference](https://grafana.com/docs/grafana-cloud/observe-and-act/monitor-infrastructure/integrations/integration-reference/integration-supabase/) for manual configuration.
|
||
- [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/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.
|