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.
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 $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
| Where | What it tells you |
|---|---|
GET /healthz | the process is up. Use it for liveness |
GET /readyz | the 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/health | platform-wide: paused, disabled_channels, queues (depth and oldest ready message per queue), jobs (last run of each scheduler job). Operator token |
GET /v1/engine/health | the same plus the project's flags. admin key. Queue depths are platform-wide numbers |
node dist/cli.js health | the 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 samereq_…id the API returns inmeta.request_id. Search by it when a client reports an error. - Engine lines carry the ids they touched, such as
projectId,enrollmentId,runId,contactId,endpointIdordeliveryId, 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, …) anddurationMs. A failing job logsjob <name> failedwith the error. - The
Authorizationheader and fields namedapi_key,client_secret,secretandrefresh_tokenare redacted.
The plan job runs every 5 seconds, so info is chatty. Use warn if you only want problems.
Alerts worth setting
| Signal | What it means |
|---|---|
/readyz failing on a worker | the scheduler stopped, or the database is unreachable |
a queue's depth growing for ten minutes | the worker is behind, or a provider is failing |
the plan job's last run older than a minute | no planner is running |
run.needs_review webhooks | a text with an unknown outcome waits for a human |
run.failed, or enrollment.paused with step_failed | a step ran out of retries with no failed branch wired |
endpoint.disabled | your own webhook receiver has been down for three days, or its secret can no longer be decrypted |
sender.channel_status with credentials_needed | a sender must save their mailbox settings again |
5xx from the API, INTERNAL_ERROR in responses | search 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
/metricsendpoint.SEQ_METRICSis accepted and ignored. - No per-channel circuit breaker.
- An incoming
X-Request-Idheader is not propagated; the service makes its ownreq_…id.