---
title: Metrics and logs reference
subtitle: Complete reference for all metrics and log fields exported by Neon
summary: >-
  Covers the reference for metrics and log fields exported by Neon to
  observability platforms, detailing available metrics, their labels, and
  integration specifics with tools like Datadog and Grafana Cloud.
enableTableOfContents: true
updatedOn: '2026-02-06T22:07:33.145Z'
---

This page provides a comprehensive reference for all metrics and log fields that Neon exports to observability platforms through integrations like [Datadog](/docs/guides/datadog), [Grafana Cloud](/docs/guides/grafana-cloud), and [OpenTelemetry](/docs/guides/opentelemetry).

## Available metrics

Neon makes the following metrics available for export to third parties through our observability integrations.

All metrics include the following labels:

- `project_id`
- `endpoint_id`
- `compute_id`
- `job`

Here's an example of the metric `db_total_size` with all labels:

```json shouldWrap
neon_db_total_size{project_id="square-daffodil-12345678", endpoint_id="ep-aged-art-260862", compute_id="compute-shrill-blaze-b4hry7fg", job="sql-metrics"} 10485760
```

<Admonition type="note">
In Datadog, metric labels are referred to as `tags.` See [Getting Started with Tags](https://docs.datadoghq.com/getting_started/tagging/) in the Datadog Docs.
</Admonition>

| Name                                                   | Job                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------ | -------------------- |   |
| neon_connection_counts                                 | sql-metrics          | Total number of database connections. The `state` label indicates whether the connection is `active` (executing queries), `idle` (awaiting queries), or in a variety of other states derived from the [pg_stat_activity](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW) Postgres view.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| neon_db_total_size                                     | sql-metrics          | Total size of all databases in your project, measured in bytes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| neon_lfc_approximate_working_set_size_windows          | sql-metrics          | Approximate [working set size](/docs/manage/endpoints#sizing-your-compute-based-on-the-working-set) in pages of 8192 bytes. The metric is tracked over time windows (5m, 15m, 1h) to gauge access patterns. Duration values: `duration="5m"`, `duration="15m"`, `duration="1h"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| neon_lfc_cache_size_limit                              | sql-metrics          | The limit on the size of the Local File Cache (LFC), measured in bytes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| neon_lfc_hits                                          | sql-metrics          | The number of times requested data was found in the LFC (cache hit). Higher cache hit rates indicate efficient memory use.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| neon_lfc_misses                                        | sql-metrics          | The number of times requested data was not found in the LFC (cache miss), forcing a read from slower storage. High miss rates may indicate insufficient compute size.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| neon_lfc_used                                          | sql-metrics          | The amount of space currently used in the LFC, measured in 1MB chunks. It reflects how much of the cache limit is being utilized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| neon_lfc_writes                                        | sql-metrics          | The number of write operations to the LFC.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| neon_max_cluster_size                                  | sql-metrics          | The `neon.max_cluster_size` setting in MB.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| neon_pg_stats_userdb                                   | sql-metrics          | Aggregated metrics from the [pg_stat_database](https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-DATABASE-VIEW) Postgres view.<br /><br />We collect stats from the oldest non-system databases based on their creation time, but not for all databases. Only the first X databases (sorted by creation time) are included.<br /><br />**datname**: The name of the database<br />**kind**: The type of value being reported. One of the following:<br />- **db_size**: The size of the database on disk, in bytes (`pg_database_size(datname)`)<br />- **deadlocks**: The number of deadlocks detected<br />- **inserted**: The number of rows inserted (`tup_inserted`)<br />- **updated**: The number of rows updated (`tup_updated`)<br />- **deleted**: The number of rows deleted (`tup_deleted`) |
| neon_pgbouncer_config_max_client_connections           | sql-metrics          | Configured maximum number of client connections in pgBouncer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| neon_pgbouncer_pools_client_active_cancel_connections  | sql-metrics          | Number of active cancel requests from clients in pgBouncer pools.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| neon_pgbouncer_pools_client_active_connections         | sql-metrics          | Number of active client connections in pgBouncer pools.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| neon_pgbouncer_pools_client_maxwait_seconds            | sql-metrics          | Maximum client wait time in seconds for pgBouncer pools.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| neon_pgbouncer_pools_client_waiting_cancel_connections | sql-metrics          | Number of cancel requests waiting in pgBouncer pools.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| neon_pgbouncer_pools_client_waiting_connections        | sql-metrics          | Number of client connections waiting in pgBouncer pools.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| neon_pgbouncer_pools_server_active_connections         | sql-metrics          | Number of active server connections in pgBouncer pools.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| neon_pgbouncer_pools_server_idle_connections           | sql-metrics          | Number of idle server connections in pgBouncer pools.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| neon_replication_delay_bytes                           | sql-metrics          | The number of bytes between the last received LSN (`Log Sequence Number`) and the last replayed one. Large values indiciate replication lag.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| neon_replication_delay_seconds                         | sql-metrics          | Time since the last `LSN` was replayed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| host_cpu_seconds_total                                 | compute-host-metrics | The number of CPU seconds accumulated in different operating modes (user, system, idle, etc.).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| host_load1                                             | compute-host-metrics | System load averaged over the last 1 minute. Example: for 0.25 CU, `host_load1` of `0.25` means full utilization, >0.25 indicates waiting processes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| host_load5                                             | compute-host-metrics | System load averaged over the last 5 minutes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| host_load15                                            | compute-host-metrics | System load averaged over the last 15 minutes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| host_memory_active_bytes                               | compute-host-metrics | The number of bytes of active main memory.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| host_memory_available_bytes                            | compute-host-metrics | The number of bytes of main memory available.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| host_memory_buffers_bytes                              | compute-host-metrics | The number of bytes of main memory used by buffers.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| host_memory_cached_bytes                               | compute-host-metrics | The number of bytes of main memory used by cached blocks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| host_memory_free_bytes                                 | compute-host-metrics | The number of bytes of main memory not used.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| host_memory_shared_bytes                               | compute-host-metrics | The number of bytes of main memory shared between processes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| host_memory_swap_free_bytes                            | compute-host-metrics | The number of free bytes of swap space.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| host_memory_swap_total_bytes                           | compute-host-metrics | The total number of bytes of swap space.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| host_memory_swap_used_bytes                            | compute-host-metrics | The number of used bytes of swap space.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| host_memory_swapped_in_bytes_total                     | compute-host-metrics | The number of bytes that have been swapped into main memory.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| host_memory_swapped_out_bytes_total                    | compute-host-metrics | The number of bytes that have been swapped out from main memory.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| host_memory_total_bytes                                | compute-host-metrics | The total number of bytes of main memory.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| host_memory_used_bytes                                 | compute-host-metrics | The number of bytes of main memory used by programs or caches.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

## Postgres logs

Neon can export Postgres logs to observability platforms, providing visibility into database activity, errors, and performance. These logs include:

- Error messages and warnings
- Connection events
- System notifications

### Log fields and metadata

Logs include the following labels and metadata for filtering and organization:

- `project_id`
- `endpoint_id`
- Timestamp
- Log level
- And other standard PostgreSQL log fields

<Admonition type="note">
During the beta phase, you may see some Neon-specific system logs included. These will be filtered out before general availability (GA).
</Admonition>

### Performance considerations

Enabling log export may result in:

- An increase in compute resource usage for log processing
- Additional network egress for log transmission, billed on paid plans for usage over 100 GB
- Associated costs based on log volume in your observability platform

<Admonition type="note">
Neon computes only send logs and metrics when they are active. If the [Scale to Zero](/docs/introduction/scale-to-zero) feature is enabled and a compute is suspended due to inactivity, no logs or metrics will be sent during the suspension. This may result in gaps in your data.

Additionally, if you are setting up an integration for a project with an inactive compute, you'll need to activate the compute before it can send data. To activate it, simply run a query from the [Neon SQL Editor](/docs/get-started/query-with-neon-sql-editor) or any connected client.
</Admonition>

### Technical details

Neon processes logs directly on each compute instance using [rsyslogd](https://www.rsyslog.com/doc/index.html), an industry-standard open source logging utility. This compute-level processing means that log collection contributes to your compute's resource usage.

## Integration guides

For platform-specific setup instructions and examples, see:

- [Datadog integration](/docs/guides/datadog) - Setup instructions, dashboard configuration, and Datadog-specific features
- [Grafana Cloud integration](/docs/guides/grafana-cloud) - Native OTLP integration with automatic routing to Mimir, Loki, and Tempo
- [OpenTelemetry integration](/docs/guides/opentelemetry) - OTLP configuration for any compatible observability platform

<NeedHelp />
