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
Graceful shutdown (engine):axum::serve has no with_graceful_shutdown and no SIGTERM handler (apps/engine/src/main.rs:67) — the process is hard-killed, dropping in-flight appends and long-polls (recovered only via at-least-once re-peek). Add SIGTERM handling: stop accepting, complete in-flight appends, close long-polls cleanly, stop the ingestor after its current batch (post-advance). The TS ds-server/api-server already handle SIGTERM.
Readiness vs liveness:/health returns a static "ok" before Postgres or DS are reachable (http.rs:16). Add /ready gated on {PG connected, slot exists and streaming, DS reachable}; keep /health as pure liveness. Optionally upstream's hold-briefly-then-503 pattern for requests arriving during startup (5s, then retry-after).
Metrics (gaps vs the set upstream exports; ours cover engine internals well but not ops):
slot_retained_wal_size + confirmed_flush_lsn_lag (bytes) — the two that page you before the primary's disk fills
replication receive-lag distribution (commit-to-ingest ms)
request counts by status (/v1/shape + control plane), tagged known-error vs unexpected
These land on the utility port (see auth issue). Wire the existing /metrics/prometheus exporter; add OTel trace-sampling knobs before enabling tracing at production volume (upstream defaults to 1% span sampling).
Graceful shutdown (engine):
axum::servehas nowith_graceful_shutdownand no SIGTERM handler (apps/engine/src/main.rs:67) — the process is hard-killed, dropping in-flight appends and long-polls (recovered only via at-least-once re-peek). Add SIGTERM handling: stop accepting, complete in-flight appends, close long-polls cleanly, stop the ingestor after its current batch (post-advance). The TS ds-server/api-server already handle SIGTERM.Readiness vs liveness:
/healthreturns a static "ok" before Postgres or DS are reachable (http.rs:16). Add/readygated on {PG connected, slot exists and streaming, DS reachable}; keep/healthas pure liveness. Optionally upstream's hold-briefly-then-503 pattern for requests arriving during startup (5s, thenretry-after).Metrics (gaps vs the set upstream exports; ours cover engine internals well but not ops):
slot_retained_wal_size+confirmed_flush_lsn_lag(bytes) — the two that page you before the primary's disk fills/v1/shape+ control plane), tagged known-error vs unexpectedtable/*vsshape/*)These land on the utility port (see auth issue). Wire the existing
/metrics/prometheusexporter; add OTel trace-sampling knobs before enabling tracing at production volume (upstream defaults to 1% span sampling).🤖 Generated with Claude Code