API reference

Monitoring

Health checks, Prometheus metrics and what to do when a check fires.

Where to look

SurfaceAccessUse
GET /v1/ops/statusKey with ops:readJSON: overall status and one entry per check
GET /v1/ops/metricsKey with ops:readPrometheus text 0.0.4
pnpm cli check in apps/workerDatabase accessThe same checks; exits 1 when any check is critical
pnpm keys create monitoring --tenant <slug> --scopes ops:read

Checks

CheckFires whenFirst response
worker_heartbeatNo worker seen for 120 sIs the worker running? Check database connectivity
mint_poll_freshnessMint state not polled recentlyLook for a job stuck on RPC retries
chain_clock_lagFinalized clock over 120 s behind wall timeThe RPC provider is stale
overdue_activationsA scheduled change is 300 s past due and unsettledLook for a failing rebuild_timeline job for that mint
job_queue_drainingPending jobs waiting over 30 minWorker down or saturated
failed_jobs_24hJobs exhausted retriesRead jobs_outbox.last_error
balance_reconciliationA fully replayed position differs from chainConversion is already disabled; treat it as a ledger bug
provider_agreementThe independent RPC disagrees (critical), or none is configured (warn)See Independent RPC provider
failed_wallet_syncsA wallet sync failedRead wallet_syncs.error and re-request the sync
timeline_gapsA mint's multiplier history has gapsAffected positions are already partial
issuer_feedNothing loaded, or live data staleWith recorded fixtures this is ok by design

Prometheus

scrape_configs:
  - job_name: corpact
    metrics_path: /v1/ops/metrics
    authorization: { type: Bearer, credentials_file: /etc/corpact/ops-key }
    static_configs: [{ targets: ['api.internal:4600'] }]

Alert on corpact_check_status == 2. The RPC budget comes from corpact_rpc_requests_total, and disagreements from corpact_provider_disagreements.