Supabase Cloud

Versión de integración1.1.0

To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email support@ddog-gov.com.

Esta página aún no está disponible en español. Estamos trabajando en su traducción.
Si tienes alguna pregunta o comentario sobre nuestro actual proyecto de traducción, no dudes en ponerte en contacto con nosotros.

Overview

Supabase 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

Connect your Supabase Cloud project to Datadog using OAuth. OAuth is the only way to connect a new project; Personal Access Token (PAT) setup is deprecated and no longer available for new accounts. Existing PAT-based accounts continue to collect data, but can no longer be edited from the Datadog integration tile. Re-authenticate with OAuth as described below to make changes.

If your Postgres log volume exceeds 200 messages per second, Datadog recommends using the Datadog Log Drain 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.

Connect your Supabase Cloud project to Datadog (OAuth)

  1. In the Datadog app, navigate to the Supabase Cloud integration tile and click Add account.

  2. Fill in the account settings:

    ParameterDescription
    Account nameUsed to identify this account in Datadog.
    Project IDSupabase project ID, found in the URL of your Supabase project. For example: https://app.supabase.com/project/<project_id>.
    Collect LogsEnable this option to collect logs from your Supabase project using the Management API instead of a Datadog Log Drain.
    Enable Database MonitoringEnable this option to get query performance insights for your Supabase databases.
  3. Click Connect via OAuth. You’re redirected to Supabase to log in (if you aren’t already) and select the organization that owns the project entered above.

  4. Review the permissions Datadog is requesting and click Authorize.

  5. You’re redirected back to the Supabase Cloud integration tile in Datadog, where the newly connected account now appears.

[Deprecated] Personal Access Token setup

The following steps only apply to accounts that were connected before OAuth support was added, and are kept here for reference. To connect a new project, use the OAuth setup above instead.

Retrieve the service_role API key

  1. Log in to Supabase as an administrator.
  2. Navigate to Project Settings > API Keys.
  3. On the Legacy API Keys tab, retrieve the service_role API key.

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 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.
    2. Click Invite member.
    3. In the Member-role dropdown, select Read-only.
    4. Complete the invitation and log in as the new user.
  2. Navigate to the Access Tokens page of the dashboard.

  3. Click Generate new token.

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

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

Data Collected

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

When you enable log collection for this integration, all Postgres and application log messages are collected using the Management API. Alternatively, you can use a Datadog Log Drain 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

The Supabase Cloud integration does not include any events.

Service Checks

The Supabase Cloud integration does not include any service checks.

Troubleshooting

Need help? Contact Datadog support.