observability: backend-agnostic error-capture seam (Phase 1, inert until SENTRY_DSN)

This commit is contained in:
Moheeb Zara
2026-05-21 17:00:37 -07:00
parent 95f79771ec
commit c89e4d95e1
12 changed files with 434 additions and 5 deletions
+2
View File
@@ -14,6 +14,7 @@ import {
cardMatchesEvent,
type DoorIngestEvent,
} from '@/lib/door-log-logic'
import { captureException } from '@/lib/observability/capture'
type Admin = ReturnType<typeof createAdminClient>
@@ -115,6 +116,7 @@ export async function ingestEvents(
// Anything else (e.g. a transient DB error) is surfaced via console so
// the row is not silently lost; the next poll re-attempts it.
console.error('[door-ingest] insert failed:', error.message)
captureException(error, { surface: 'door/ingest', tags: { stage: 'insert' } })
}
continue
}