From e830d99cee8f5bf6209086af63dcef6909b85142 Mon Sep 17 00:00:00 2001 From: oktofeesh1 <287075021+oktofeesh1@users.noreply.github.com> Date: Tue, 30 Jun 2026 03:35:43 -0700 Subject: [PATCH] feat(observability): add self-host Sentry monitors --- .../routes/docs.self-hosting-operations.tsx | 30 +++ src/selfhost/monitored-work.ts | 75 ++++++++ src/selfhost/sentry.ts | 114 +++++++++++- src/server.ts | 72 ++++--- test/unit/selfhost-monitored-work.test.ts | 176 ++++++++++++++++++ test/unit/selfhost-sentry.test.ts | 140 ++++++++++++++ 6 files changed, 575 insertions(+), 32 deletions(-) create mode 100644 src/selfhost/monitored-work.ts create mode 100644 test/unit/selfhost-monitored-work.test.ts diff --git a/apps/gittensory-ui/src/routes/docs.self-hosting-operations.tsx b/apps/gittensory-ui/src/routes/docs.self-hosting-operations.tsx index a76c2a474d..0711d8cfca 100644 --- a/apps/gittensory-ui/src/routes/docs.self-hosting-operations.tsx +++ b/apps/gittensory-ui/src/routes/docs.self-hosting-operations.tsx @@ -85,6 +85,36 @@ review_context_fetch_failed`}

+

Sentry cron monitors

+

+ When SENTRY_DSN is set, the self-host runtime emits Sentry monitor check-ins + for the recurring loops where silent stoppage matters most. Leaving SENTRY_DSN{" "} + unset keeps monitor reporting off. +

+ +

+ A missed monitor means the process may still be alive but the recurring work is not checking + in on schedule. Pair the monitor with queue depth, dead-job counts, and the structured error + log for the same subsystem. +

+

Routine checks