Monitoring and recovery
Launch requires detecting stalled generation and restoring a project together with its files.
A
/healthresponse does not prove a site can be built or restored from backup.
These are requirements for future operations. Dashboards, alerts, a backup schedule and verified RPO/RTO are not confirmed yet.
What to monitor
| Signal | What it reveals |
|---|---|
| API and dependency availability | Process alive but database or storage unavailable |
| Age of waiting jobs | Queue has stopped moving |
| Execution time, errors and retries | Worker stalls or spends resources in repair loops |
| Generation and editing cost | Spending exceeds the chosen limit |
| Test publication check | Broken HTML, images or routing |
| Domain and HTTPS state | A customer address stopped working |
| Backup and latest restore result | Backup missing or unusable |
Set thresholds after measuring and assigning responsibility. Unmeasured numbers do not become an SLA. Logs need request, project, job and version IDs; do not record complete private materials or secrets by default.
Error reports (GlitchTip)
The API sends its own failures to GlitchTip, an error tracker that speaks the Sentry protocol: every answer with a 5xx status, every error nothing handled, and every background job that ran out of retries. Refusals the caller caused (not found, validation, sign-in, permission) are not reported.
| Variable | Value |
|---|---|
SENTRY_DSN | The project's DSN. Empty: reporting is off and nothing leaves the server (local, tests, CI). A secret. |
SENTRY_ENVIRONMENT | prod (DigitalOcean, bonsite.ai), dev or local. Anything else, or nothing, keeps reporting off: GlitchTip keeps every environment name forever. |
SENTRY_RELEASE | The git sha the running build was made from. |
A report carries the error, its stack, the method and path of the request, harmless headers (user agent, content type, language), the request id and the user's id. It never carries a request body, a query string, cookies, Authorization or key headers, e-mail addresses, or what a person wrote. GlitchTip has no release health, so sessions are off.
To try it from a laptop: put the DSN and SENTRY_ENVIRONMENT=local in api/.env.dev, restart the API, and remove both afterwards.
What to preserve
The database of owners, jobs, versions and domains; material and publication files; keys needed to recover encrypted settings. The source repository replaces none of these backups. Persistent disk and object storage are not independent backups on their own.
Database and file backups must match a consistent point or preserve every object referenced by the restored database. While a backup is needed for recovery, old-object cleanup must not destroy it.
Recovery test
Restore data and files in a separate environment, load keys securely, and open a project and its published version. Check images, domain binding and a new edit. Record actual data loss and recovery time; agree RPO and RTO from these results.
First actions during a failure
Generation stopped. Compare job and worker state, limit new attempts and preserve the working publication. Retry through the intended mechanism rather than manually creating a new project.
Files unavailable. Check credentials, selected bucket/disk and version existence. Do not automatically regenerate: this may hide loss of originals.
Domain does not open. Check verification, DNS, certificate and binding. An unknown hostname must not return a random site; fallback-address rules are in publishing.
Database unavailable. Stop risky changes, check connectivity and recovery state. Viewing finished sites should be separated from the editor where possible; behavior during database failure needs testing with the selected router.