Operations

Observability

Edit page
Monitor Customer Portal with its current runtime signals and establish a production reliability baseline.

Customer Portal currently writes application and migration messages to standard output and error. PostgreSQL and Resend provide additional service-level signals, while invoice email history records provider message state in the database.

There is not yet a dedicated health endpoint, structured logging contract, application metrics, distributed tracing, or bundled error-tracking integration. Treat those as contribution opportunities, not as existing capabilities.

Minimum monitoring baseline

SignalAlert whenWhy it matters
Process and restartsthe service is unavailable or repeatedly restartsmigration or startup failure can prevent Nuxt from serving
HTTPS probe/ fails, times out, or has abnormal latencyconfirms public routing and the Node process
PostgreSQLconnections, CPU, memory, storage, locks, or query latency cross safe limitsmost authenticated and feature workflows depend on the database
HTTP errors5xx rate or latency changes materiallycatches application regressions that a homepage probe misses
Migration outputthe release job or Docker entrypoint exits non-zeronew code must not run against an unexpected schema
Authentication emailsend errors or prerequisite warnings appearverification, invitations, OTP, and recovery can stop working silently for users
Invoice deliveryfailed or persistently pending messages increaseinvoices can be generated successfully but not delivered
Backupsthe newest verified backup exceeds the RPOavailability without recoverability is incomplete
Restore drillsno successful drill exists within the agreed intervala stored archive may still be unusable

An HTTP probe of / confirms only the public web path. It does not prove PostgreSQL, authentication, authorization, OAuth, or email delivery are healthy.

Release smoke checks

After every production release, run a small set of controlled checks:

  1. load the homepage and sign-in page over the public HTTPS origin;
  2. authenticate with a non-privileged test account;
  3. select its expected organization and load a protected page;
  4. read a representative, database-backed feature view;
  5. exercise any workflow changed by the release;
  6. inspect startup, migration, server, database, and provider signals.

Keep routine smoke checks non-destructive. Do not create invoices, send customer email, approve time, or mutate financial records unless the deployment has dedicated synthetic data and cleanup rules.

Handle logs as sensitive data

Current log messages can include request paths, email addresses, subjects, organization context, and provider errors. Restrict access and retention. Never log cookies, authorization headers, OAuth tokens, password-reset links, OTPs, API keys, database URLs, attachment bodies, or complete request payloads.

When sharing an incident excerpt, redact personal data and secrets while preserving the timestamp, source revision, route pattern, error type, and correlation information needed for diagnosis.

A production-focused contribution should introduce these capabilities as explicit, reviewed contracts:

  • structured server logs with request or correlation IDs;
  • redaction at the logging boundary;
  • a process-only liveness endpoint and a database-aware readiness endpoint;
  • request rate, latency, error, job, email, and migration metrics;
  • error tracking with source revision and deployment environment;
  • documented retention, access, privacy, and alert ownership.

Keep liveness independent of PostgreSQL so an orchestrator does not restart healthy processes during a database outage. Readiness may fail when the application cannot safely serve database-backed traffic. Avoid returning configuration, dependency versions, database details, or secrets from either endpoint.

Propose this work as a reusable module or core capability in module proposals.