Skip to the page

Guides · Shipping & operations

Production monitoring

Verify project health after deploys, inspect slow queries and policy cost, monitor job queues and webhooks and audit org activity.

API
—
In the schema
—

What you’ll build#

This guide turns the commands introduced in Environments & going live into an operating routine for production. A quick verification step runs after every deploy, and a daily review inspects query latencies, background jobs, webhook deliveries and organization audit events through the CLI or console.

CadenceCommandCatches
After each deploynapalm status notesCatchesAn enabled subsystem missing a required configuration
One hour post-deploynapalm insights notesCatchesStatements regressing since the last schema push
Dailynapalm insights notes --days 7CatchesHigh-cost statements and missing indexes
Dailynapalm queue ls notes --status failedCatchesJobs that exhausted automatic retries
Dailynapalm webhooks ls notesCatchesWebhooks in Retrying, Failing or Paused state
Dailynapalm activityCatchesUnexpected service keys, settings edits or webhook changes

To diagnose a specific error response or empty query result, see Troubleshooting & auditing.

Before you start#

Start from a production project configured with the launch settings in Environments & going live. Queue commands apply when your project uses background jobs, and webhook commands apply once you register an outbound webhook such as the receiver in A backend service.

Inspection commands require only read scope, whereas retrying jobs, resuming or testing webhooks, building recommended indexes and running napalm changes require manage scope (see Read and manage roles).

Check the project after each deploy#

Run napalm status notes immediately after every deploy. Each project subsystem reports as active, disabled or gap in --json output (such as email verification required without an SMTP server). Add a post-push check in CI so incomplete configurations fail the pipeline right away.

.github/workflows/deploy.yml
    steps:      # … checkout and install, as before      - run: napalm schema push notes --yes      # Fail the deploy if any enabled subsystem is missing a required setting      - run: napalm status notes --json | jq -e 'all(.checks[]; .state != "gap")'

Each migration also logs project schema migrated at the top of napalm activity. One hour after a push, napalm insights notes compares per-call execution times before and after the migration under Since the last schema change, flagging any statement at least 1.5× slower (or printing Nothing got slower when latencies held steady).

Speed up the heaviest queries#

napalm insights ranks statements by cumulative execution time across your chosen lookback window, or by per-call latency when you pass --by mean.

Query and policy telemetry

Track statement latency, replica read share, access-policy overhead and index advice.

Below the statement rankings, a caller breakdown reports p50 and p95 latencies per deployed query across up to 30 days (--days 7 for a weekly window).

Terminal
# Inspect heaviest statements, index recommendations and 7-day deployed query latenciesnapalm insights notes --days 7 # Sort statements by mean execution time per call instead of total timenapalm insights notes --by mean # Preview and build a recommended index on mainnapalm schema index notes Note title

Under Indexes that would help, insights estimates each candidate index’s runtime savings and prints the exact napalm schema index command to build it on main. Concurrent writes to that type wait while PostgreSQL builds the index, and adding the matching index on declaration to dbschema/default.gel preserves the index on future pushes.

dbschema/default.gel
module default {  type Note {    # … as before, and:    index on (.title);  }}

Troubleshooting & auditing covers optimizing access policies that dominate query latency.

Retry failed jobs#

Failed job attempts retry automatically according to the backoff schedule in Retries. If the final attempt fails, the job remains in failed status until an operator retries or deletes its row.

Operator job retries

Exhausted jobs remain queued for inspection until you trigger a retry.

napalm queue ls summarizes waiting, running and failed job counts and prints each failed job’s query name, attempt count and latest error message. Deploy your query or handler fix first, copy the full UUID from --json output and run napalm queue retry to schedule an immediate retry with a 24-hour window.

Terminal
# List exhausted jobs newest first alongside attempt counts and last errornapalm queue ls notes --status failed # Print full job UUIDs as JSON for retryingnapalm queue ls notes --status failed --json # Schedule an immediate retry with a fresh 24-hour execution windownapalm queue retry notes <job-id>

Manual retries appear in napalm activity. Job variables stay inside your database and are never exposed in CLI or console queue summaries.

Keep webhooks delivering#

napalm webhooks ls notes reports one of five delivery states for each webhook.

Delivering
Every recent delivery succeeded.
Retrying
The newest delivery failed and is queued for automatic retry.
Failing
Deliveries exhausted retries since the last success.
Paused
An operator paused the webhook, or Napalm paused a ping webhook after 24 hours of continuous failures. Queued deliveries wait until resumed.
No recent deliveries
No matching event has fired recently.

The latest error per destination prints beneath the table. napalm webhooks deliveries inspects recent ping attempts alongside receiver HTTP statuses, retaining succeeded pings for one hour and failed pings for 48 hours. Row-carrying webhooks report change-log catch-up status directly in napalm webhooks ls.

Terminal
# Inspect delivery state and latest error across all branch webhooksnapalm webhooks ls notes # List recent ping deliveries and HTTP status codes for one destinationnapalm webhooks deliveries notes --url https://api.example.com/hooks/napalm # Resume a paused webhook and flush queued deliveries once the receiver recoversnapalm webhooks resume notes https://api.example.com/hooks/napalm

Notifications & webhooks documents backoff schedules and signature verification.

Audit org activity and changes#

napalm activity lists recent organization control-plane events alongside actor and timestamp (25 events by default, or 100 via --limit 100). Review the log daily for unexpected service keys, endpoint edits or webhook changes.

napalm changes summarizes a branch’s data-plane change log, printing each commit’s timestamp, caller class, credential ID and per-type insert, update and delete counts without exposing row values. Gap entries flag missing stretches of the log, and after an unplanned failover, passing --lost alongside a lost gap’s bookmark lists the affected types (see Gaps in the change log).

The cluster retains a dropped branch’s change log and bills for its storage until the scheduled deletion date. Run napalm branches forget to purge the log early.

Terminal
# List the 100 newest organization audit events alongside actor and timestampnapalm activity --limit 100 # Summarize main-branch commits over the past 24 hours by type and caller (requires manage scope)napalm changes notes --since 1d # List retained change logs from deleted branches alongside size and purge datenapalm branches dropped notes

Monitor the project in the console#

The web console surfaces the same operational views as the CLI.

Overview
The Needs you panel highlights clusters or projects requiring attention, failed or timed-out operations and spend past your alert threshold. Failed jobs and failing webhooks appear under each project’s Queries tab.
Queries tab
A project’s Queries tab renders the four napalm insights views: Statements, Indexes that would help, Since the last schema change and Deployed queries by caller. Clicking Add index runs the same migration as napalm schema index.
Jobs and webhooks
The same tab lists Jobs, Changes and Webhooks alongside per-webhook Deliveries and provides one-click retries for failed or cancelled jobs.
Activity
Displays the organization audit log matching napalm activity.
Members and engines
Each cluster page links every PostgreSQL member and stateless engine to live machine metrics.

Web console documents the overview, Queries tab, webhooks, activity log and member and engine metrics in full.

Check the routine#

  1. Push a schema change

    Confirm your CI deploy passes the napalm status gate and napalm activity records project schema migrated at the top of the log.

  2. Inspect post-deploy insights one hour later

    Run napalm insights notes and verify Since the last schema change displays the push timestamp along with any regressed statements or Nothing got slower.

  3. Send a synthetic webhook test

    Run napalm webhooks test notes https://api.example.com/hooks/napalm and confirm napalm webhooks deliveries notes records note_changed (test) as Delivered (HTTP 204).

Type a word or two to search every docs page.