neondatabase/neon
How to monitor
All Neon services are designed to be observable from a typical cloud-native stack: structured logs, Prometheus metrics, and OpenTelemetry traces. This section enumerates what's emitted and where.
Pages
- Logging — log format, where logs go, useful queries.
- Metrics — Prometheus surfaces, key SLIs.
- Tracing — OTLP setup, span conventions.
At a glance
- Logs. JSON-formatted, written to stderr. Use
LOGFMT=textfor human-readable. The formatter is inlibs/tracing-utils/. - Metrics. Prometheus exposition over
GET /metrics. The metrics client islibs/metrics/. - Traces. OpenTelemetry. Set
OTEL_EXPORTER_OTLP_ENDPOINTto enable. The crate islibs/tracing-utils/plustracing-opentelemetry.
The proxy binary is one exception: it has additional consumption-metrics emission (proxy/src/usage_metrics.rs) feeding billing pipelines. See Proxy.
Common SLOs to watch
For the pageserver:
pageserver_smgr_query_seconds_bucket—GetPage@LSNlatency.pageserver_layer_count— total layer files. Spikes signal stalled compaction.pageserver_remote_*_latency_seconds_bucket— remote storage I/O latency.pageserver_walredo_*— WAL-redo subprocess health.
For the safekeeper:
safekeeper_flush_lsnper timeline — disk durability.safekeeper_commit_lsnper timeline — quorum-confirmed durability.safekeeper_active_segments— active timeline count.
For the proxy:
proxy_connection_*— connection rate and outcome.proxy_io_*— proxied byte counts.proxy_compute_connection_seconds_bucket— time to acquire a compute connection.
For the storage controller:
storcon_reconciles_totaland_seconds— reconciler activity.storcon_pageservers_alive— fleet liveness.
Log conventions across services
- Every per-request log line includes
tenant_id,timeline_id, and arequest_idthat's propagated from the caller. The pageserver also addskeyandlsnforGetPage@LSNrequests. - Top-level errors are emitted with the error chain expanded (
anyhowbacktraces). - Background tasks emit
infoon transitions ("compaction starting", "compaction complete in X").
When something is on fire
- The
pageserver/debug_endpointsAPI dumps internal state for one tenant. pagectl(offline) can inspect on-disk layer files.storcon-clican query the controller's view of the fleet.- Setting
RUST_LOG=debugon a single service for a short window often surfaces the problem when metrics don't.
For per-component troubleshooting see Debugging.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.