---
title: Supabase Cloud
description: Monitor the activity, health, and performance of your Supabase Cloud projects.
breadcrumbs: Docs > Integrations > Supabase Cloud
---

# Supabase Cloud
Integration version1.0.0
## Overview{% #overview %}

[Supabase](https://supabase.com/) is a Postgres development platform that provides a managed Postgres database with additional features including user authentication, client libraries, Edge Functions, Realtime subscriptions, Object Storage, and Vector embeddings. While Supabase supports a self-hosted version, this integration only supports Supabase Cloud project instances.

With this integration, you can, per Supabase project:

- Collect essential Postgres Database metrics and monitor critical behavior on primary and replica instances.
- Collect Postgres server OS metrics and monitor CPU, filesystem, memory, and network load.
- Collect Postgres database logs which can include slow statements, errors, and audit statements.
- Collect Supabase application layer logs from edge functions and Auth, REST, Storage, and Realtime APIs.
- Collect business logic log messages from your edge function applications.

## Setup{% #setup %}

The Supabase Cloud integration requires the `service_role` API key to retrieve metrics from the hosted project's [metrics endpoint](https://supabase.com/docs/guides/telemetry/metrics). If you want to collect logs, you also need a [Personal Access Token](https://supabase.com/dashboard/account/tokens) to access the Supabase [Management API](https://supabase.com/docs/reference/api/introduction).

If your Postgres log volume exceeds 200 messages per second, Datadog recommends using the [Datadog Log Drain](https://supabase.com/docs/guides/telemetry/log-drains) instead of this integration's log collection feature.

**Important**: If you have a Datadog Log Drain configured for your Supabase project, disable it before enabling log collection via this integration to avoid duplicate logs.

### Retrieve the service_role API key{% #retrieve-the-service_role-api-key %}

1. Log in to [Supabase](https://supabase.com/) as an administrator.
1. Navigate to **Project Settings** > **API Keys**.
1. On the **Legacy API Keys** tab, retrieve the `service_role` API key.

### Generate a Personal Access Token{% #generate-a-personal-access-token %}

A Personal Access Token (PAT) is required to access the Supabase Management API and collect logs.

1. Log in to [Supabase](https://supabase.com/) as an administrator or a user with appropriate permissions.

**Note**: The Personal Access Token inherits the same permissions as the user who creates it. Since this integration only reads from the API, you can optionally create a user with read-only permissions:

   1. From the dashboard, navigate to **Team**.
   1. Click **Invite member**.
   1. In the **Member-role** dropdown, select **Read-only**.
   1. Complete the invitation and log in as the new user.

1. Navigate to the [Access Tokens page](https://supabase.com/dashboard/account/tokens) of the dashboard.

1. Click **Generate new token**.

1. Enter a name for the token, select **Never** for **Expires in**, and click **Generate token**.

1. Copy the token value displayed at the top of the page. Store it securely, as it won't be displayed again.

### Connect your Supabase Cloud project to Datadog{% #connect-your-supabase-cloud-project-to-datadog %}

1. In the Datadog app, navigate to the [Supabase Cloud integration tile](https://app.datadoghq.com/integrations/supabase-cloud) and add your Supabase hosted project ID and `service_role` API key:

| Parameter              | Description                                                                                                                                                  |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Project ID             | Supabase project ID. For example: `https://supabase.com/dashboard/project/<project_id>/settings/general`.                                                    |
| `service_role` API key | API key needed for communication with the Metrics endpoint.                                                                                                  |
| Collect Logs           | Enable this option to collect logs from your Supabase project instead of using a [Datadog Log Drain](https://supabase.com/docs/guides/telemetry/log-drains). |
| Personal Access Token  | Token needed for communication with the Management API. Required only if **Collect Logs** is enabled.                                                        |

1. Click **Save**.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **supabase.cloud.auth\_users.user\_count**(gauge)                           | The number of users in the project database.*Shown as user*                               |
| **supabase.cloud.connection.stats.connection.count**(gauge)                 | The number of connections to the project database.*Shown as user*                         |
| **supabase.cloud.node.cpu.online**(count)                                   | The CPU is online.                                                                        |
| **supabase.cloud.node.cpu.seconds.count**(count)                            | The number of seconds the CPUs spent in each mode.*Shown as second*                       |
| **supabase.cloud.node.disk.filesystem.info**(gauge)                         | The disk filesystem description.                                                          |
| **supabase.cloud.node.disk.info**(gauge)                                    | The disk device name, model, etc. described via tags.                                     |
| **supabase.cloud.node.disk.io\_time\_seconds.count**(count)                 | The total seconds spent doing I/Os.*Shown as second*                                      |
| **supabase.cloud.node.disk.io\_time\_weighted\_seconds.count**(count)       | The weighted # of seconds spent doing I/Os.                                               |
| **supabase.cloud.node.disk.read\_bytes.count**(count)                       | The total number of bytes read successfully.*Shown as byte*                               |
| **supabase.cloud.node.disk.read\_time\_seconds.count**(count)               | The total number of seconds spent by all reads.                                           |
| **supabase.cloud.node.disk.write\_time\_seconds.count**(count)              | This is the total number of seconds spent by all writes.*Shown as second*                 |
| **supabase.cloud.node.disk.written\_bytes.count**(count)                    | The total number of bytes written successfully.*Shown as byte*                            |
| **supabase.cloud.node.filesystem.avail.bytes**(gauge)                       | The filesystem space available to non-root users in bytes.*Shown as byte*                 |
| **supabase.cloud.node.filesystem.device\_error**(gauge)                     | Whether an error occurred while getting statistics for the given device.                  |
| **supabase.cloud.node.filesystem.size\_bytes**(gauge)                       | The filesystem size in bytes*Shown as byte*                                               |
| **supabase.cloud.node.load1**(gauge)                                        | 1m load average.                                                                          |
| **supabase.cloud.node.load15**(gauge)                                       | 15m load average.                                                                         |
| **supabase.cloud.node.load5**(gauge)                                        | 5m load average.                                                                          |
| **supabase.cloud.node.memory.active\_bytes**(gauge)                         | Memory information field Active_bytes.*Shown as byte*                                     |
| **supabase.cloud.node.memory.buffers.bytes**(gauge)                         | Memory information field Buffers_bytes.*Shown as byte*                                    |
| **supabase.cloud.node.memory.cached\_byte.**(gauge)                         | Memory information field Cached_bytes.*Shown as byte*                                     |
| **supabase.cloud.node.memory.inactive.bytes**(gauge)                        | Memory information field Inactive_bytes.*Shown as byte*                                   |
| **supabase.cloud.node.memory.mem\_available.bytes**(gauge)                  | Memory information field MemAvailable_bytes.*Shown as byte*                               |
| **supabase.cloud.node.memory.mem\_free.bytes**(gauge)                       | Memory information field MemFree_bytes.*Shown as byte*                                    |
| **supabase.cloud.node.memory.mem\_total.bytes**(gauge)                      | Memory information field MemTotal_bytes.*Shown as byte*                                   |
| **supabase.cloud.node.memory.swap\_free.bytes**(gauge)                      | Memory information field SwapFree_bytes.*Shown as byte*                                   |
| **supabase.cloud.node.memory.swap\_total.bytes**(gauge)                     | Memory information field SwapTotal_bytes.*Shown as byte*                                  |
| **supabase.cloud.node.network.receive\_bytes.count**(count)                 | Network device statistic receive_bytes.*Shown as byte*                                    |
| **supabase.cloud.node.network.transmit\_bytes.count**(count)                | Network device statistic transmit_bytes.*Shown as byte*                                   |
| **supabase.cloud.node.vmstat.oom\_kill.count**(count)                       | /proc/vmstat information field oom_kill.                                                  |
| **supabase.cloud.pg.up**(gauge)                                             | Whether the last scrape of metrics from PostgreSQL was able to connect to the server.     |
| **supabase.cloud.pg\_database.size.mb**(gauge)                              | Disk space used by the database.*Shown as megabyte*                                       |
| **supabase.cloud.pg\_stat\_bgwriter.buffers\_alloc.count**(count)           | Buffers allocated                                                                         |
| **supabase.cloud.pg\_stat\_bgwriter.buffers\_checkpoint.count**(count)      | Buffers written during checkpoints                                                        |
| **supabase.cloud.pg\_stat\_bgwriter.buffers\_clean.count**(count)           | Buffers written by bg writter                                                             |
| **supabase.cloud.pg\_stat\_bgwriter.checkpoint\_sync\_time.count**(count)   | Time spent synchronizing checkpoint files to disk                                         |
| **supabase.cloud.pg\_stat\_bgwriter.checkpoint\_write\_time.count**(count)  | Time spent writing checkpoint files to disk                                               |
| **supabase.cloud.pg\_stat\_bgwriter.checkpoints\_req.count**(count)         | Requested checkpoints performed                                                           |
| **supabase.cloud.pg\_stat\_bgwriter.checkpoints\_timed.count**(count)       | Scheduled checkpoints performed                                                           |
| **supabase.cloud.pg\_stat\_bgwriter.maxwritten\_clean.count**(count)        | Number of times bg writer stopped a cleaning scan because it had written too many buffers |
| **supabase.cloud.pg\_stat\_bgwriter.stats\_reset.count**(count)             | Most recent stat reset time                                                               |
| **supabase.cloud.pg\_stat\_database.blks\_hit.count**(count)                | Disk blocks found in buffer cache                                                         |
| **supabase.cloud.pg\_stat\_database.blks\_read.count**(count)               | Number of disk blocks read                                                                |
| **supabase.cloud.pg\_stat\_database.deadlocks.count**(count)                | Deadlocks detected                                                                        |
| **supabase.cloud.pg\_stat\_database.num\_backends**(gauge)                  | The number of active backends                                                             |
| **supabase.cloud.pg\_stat\_database.temp\_bytes.count**(count)              | Temp data written by queries*Shown as byte*                                               |
| **supabase.cloud.pg\_stat\_database.temp\_files.count**(count)              | Temp files created by queries                                                             |
| **supabase.cloud.pg\_stat\_database.tup\_deleted.count**(count)             | Rows deleted                                                                              |
| **supabase.cloud.pg\_stat\_database.tup\_fetched.count**(count)             | Rows fetched by queries                                                                   |
| **supabase.cloud.pg\_stat\_database.tup\_inserted.count**(count)            | Rows inserted                                                                             |
| **supabase.cloud.pg\_stat\_database.tup\_returned.count**(count)            | Rows returned by queries                                                                  |
| **supabase.cloud.pg\_stat\_database.tup\_updated.count**(count)             | Rows updated                                                                              |
| **supabase.cloud.pg\_stat\_database.xact\_commit.count**(count)             | Transactions committed                                                                    |
| **supabase.cloud.pg\_stat\_database.xact\_rollback.count**(count)           | Transactions rolled back                                                                  |
| **supabase.cloud.pg\_status.in\_recovery**(gauge)                           | Database in recovery                                                                      |
| **supabase.cloud.pg\_wal.size**(gauge)                                      | Disk space used by WAL files*Shown as megabyte*                                           |
| **supabase.cloud.pgrst.db\_pool.available\_connections**(gauge)             | Available connections in the pool*Shown as connection*                                    |
| **supabase.cloud.pgrst.db\_pool.max\_connections**(gauge)                   | Max pool connections*Shown as connection*                                                 |
| **supabase.cloud.pgrst.db\_pool.timeouts.count**(count)                     | The total number of pool connection timeouts*Shown as connection*                         |
| **supabase.cloud.pgrst.db\_pool.waiting**(gauge)                            | Requests waiting to acquire a pool connection                                             |
| **supabase.cloud.pgrst.schema\_cache.loads.count**(count)                   | The total number of times the schema cache was loaded                                     |
| **supabase.cloud.pgrst.schema\_cache.query\_time\_seconds**(gauge)          | The query time in seconds of the last schema cache load*Shown as second*                  |
| **supabase.cloud.postgresql.restarts.count**(count)                         | Number of times postgresql has been restarted                                             |
| **supabase.cloud.realtime\_postgres\_changes.client\_subscriptions**(gauge) | Client subscriptions listening for Postgres changes                                       |
| **supabase.cloud.realtime\_postgres\_changes.total\_subscriptions**(gauge)  | Total subscription records listening for Postgres changes                                 |

### Logs{% #logs %}

When you enable log collection for this integration, all Postgres and application log messages are collected using the [Management API](https://supabase.com/docs/reference/api/introduction). Alternatively, you can use a [Datadog Log Drain](https://supabase.com/docs/guides/telemetry/log-drains) in Supabase to deliver logs to Datadog. Regardless of the delivery method, this integration uses Datadog's built-in log pipelines to parse and enrich the logs for easier searching and more detailed insights.

### Events{% #events %}

The Supabase Cloud integration does not include any events.

### Service Checks{% #service-checks %}

The Supabase Cloud integration does not include any service checks.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
