You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 55176cb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,9 @@ the same setting, the flag wins.
100
100
|`WORKOS_SYNC_POLL_MS`|`5000`| Idle wait between polls, in ms, when the last poll returned nothing. |
101
101
|`WORKOS_SYNC_LAG_MS`|`5000`| Hold back events younger than this, in ms, before advancing the cursor. |
102
102
|`WORKOS_SYNC_MAX_EVENTS_PER_TICK`| one page (100) | Events to apply per poll, fetched across as many pages as needed. |
103
+
|`WORKOS_SYNC_HEALTH_PORT`| off (`8080` in the container image) |`listen` only: serve `GET /healthz` and `GET /metrics` on this port, from in-memory state, with no database query. |
104
+
|`WORKOS_SYNC_HEALTH_HOST`|`0.0.0.0`| Interface the health server binds. |
105
+
|`WORKOS_SYNC_HEALTH_MAX_POLL_AGE_MS`|`60000`|`/healthz` returns 503 once any environment's last successful poll is older than this. |
103
106
|`LOG_LEVEL`|`info`|`debug`, `info`, `warn`, `error` or `silent`. Logs are JSON lines on stdout. |
104
107
105
108
### Commands
@@ -108,7 +111,7 @@ the same setting, the flag wins.
|`init`|| Create the schema and bookkeeping tables. Idempotent; safe on every deploy. |
110
113
|`backfill`|`--resume`| Load current state from the REST list endpoints. `--resume` continues from the last checkpoint. |
111
-
|`listen`|| Poll the Events API continuously. Finishes the current batch on `SIGINT` or `SIGTERM`. |
114
+
|`listen`|`--health-port <n>`| Poll the Events API continuously. Finishes the current batch on `SIGINT` or `SIGTERM`. With a port, serves `/healthz` and `/metrics`.|
112
115
|`tick`|| One poll, then exit. For a cron job instead of a long-running process. |
113
116
|`reconcile`|`--repair`| Diff ids against the API. Exits 2 on drift; `--repair` tombstones missed deletes and inserts missed creates. |
114
117
|`refresh`|| Re-list top-level streams to refresh fields that event payloads omit. |
|`workos_sync_up`| gauge |`1` while the engine is running; `0` once it has stopped or hit a fatal error. |
180
+
|`workos_sync_poll_age_seconds`| gauge | Seconds since the last successful poll. **Alert on this.** Absent until the first successful poll, so a listener that has never succeeded needs the `WorkOSSyncNeverPolled` rule below. |
181
+
|`workos_sync_cursor_age_days`| gauge | Age of the newest event applied: distance from the 90-day cliff, not liveness. Absent until the first event. |
182
+
|`workos_sync_ticks_total`| counter | Polls attempted, successful or not. |
0 commit comments