Self-hosting

Monitoring logs, health and alerts

How to watch a running OpenSequence: JSON logs, the health endpoints, the alerts worth setting, runs that need review, and what is not built yet.

Edit on GitHub

OpenSequence reports through structured logs and a few health endpoints. There is no metrics endpoint, so this page shows what to watch and where to read it.

curl
curl $SEQ/v1/admin/engine/health -H "Authorization: Bearer $SEQ_ADMIN_TOKEN"
# {"paused":false,"disabled_channels":[],
#  "queues":[{"queue":"seq_email","depth":3,"oldestMs":1200}],
#  "jobs":{"plan":"2026-10-16T14:09:44.957Z","signals":"…","poll":"…","reap":"…","webhooks":"…","retention":"…"}}

curl $SEQ/v1/engine/health -H "Authorization: Bearer $ADMIN_KEY"
# {"flags":{},"queues":[…],"jobs":{…},"paused":false}

Health endpoints

WhereWhat it tells you
GET /healthzthe process is up. Use it for liveness
GET /readyzthe database answers; on worker and all, the scheduler also ran a job in the last 2 minutes. 503 with a reason otherwise
GET /v1/admin/engine/healthplatform-wide: paused, disabled_channels, queues (depth and oldest ready message per queue), jobs (last run of each scheduler job). Operator token
GET /v1/engine/healththe same plus the project's flags. admin key. Queue depths are platform-wide numbers
node dist/cli.js healththe queues and jobs, from inside the container

Logs

Pino JSON on stdout, at the level set by SEQ_LOG_LEVEL (default info). Outside NODE_ENV=production they are pretty-printed when pino-pretty is installed (a source checkout); the image does not ship it, so containers always log JSON.

  • Every request line carries reqId, the same req_… id the API returns in meta.request_id. Search by it when a client reports an error.
  • Engine lines carry the ids they touched, such as projectId, enrollmentId, runId, contactId, endpointId or deliveryId, so one search follows a contact through the system.
  • Every scheduler job logs one line per run, job plan ran, with its counts (claimed, advanced, requeuedRuns, …) and durationMs. A failing job logs job <name> failed with the error.
  • The Authorization header and fields named api_key, client_secret, secret and refresh_token are redacted.

The plan job runs every 5 seconds, so info is chatty. Use warn if you only want problems.

Alerts worth setting

SignalWhat it means
/readyz failing on a workerthe scheduler stopped, or the database is unreachable
a queue's depth growing for ten minutesthe worker is behind, or a provider is failing
the plan job's last run older than a minuteno planner is running
run.needs_review webhooksa text with an unknown outcome waits for a human
run.failed, or enrollment.paused with step_faileda step ran out of retries with no failed branch wired
endpoint.disabledyour own webhook receiver has been down for three days, or its secret can no longer be decrypted
sender.channel_status with credentials_neededa sender must save their mailbox settings again
5xx from the API, INTERNAL_ERROR in responsessearch the logs by the request_id

Oldest-due lag has no endpoint; Scaling shows the SQL to read it.

Runs that need review

A text whose outcome Allo could not confirm is never retried, because a retry could text the person twice. The run is marked needs_review, a run.needs_review webhook goes out, and the enrollment stops at that step.

Today you resolve it by hand. Check in Allo whether the text left, then exit the enrollment with POST /v1/enrollments/{id}/exit. Re-enrolling starts the sequence again from the start. The needs-review list and resolve endpoints described in the architecture document are not built yet.

Not built yet

  • No Prometheus /metrics endpoint. SEQ_METRICS is accepted and ignored.
  • No per-channel circuit breaker.
  • An incoming X-Request-Id header is not propagated; the service makes its own req_… id.

On this page