Skip to content

No remote error reporting since Sentry left: wire logger.error and ErrorBoundary to PostHog exception capture, or decide on none #800

Open

Description

@thinkclay

Since #793 removed Sentry there is no remote error reporting at all. logger.error (packages/scf-core/utils/logger.ts:50-51) prints to the console and stops, and its own comment says so: "that is now the whole of error reporting." ErrorBoundary (packages/scf-core/components/ErrorBoundary.tsx) still exposes onError, but nothing upstream forwards it anywhere.

A production crash on web or native is now invisible unless a user reports it.

Recommendation: PostHog exception capture, no new dependency

posthog-js is already in the bundle (1.424.1, and its build exposes captureException), and PostHog on native is already the first-party analytics transport. Wiring logger.error and the boundary's onError to posthog.captureException(error, { context }) restores aggregated errors with zero new bundle bytes — the bundle is what #793 was protecting.

What it must respect:

The alternative is to accept no remote error reporting. That is a legitimate choice for a small app, but it should be an explicit one written next to the logger, not the accidental state.

Acceptance

  • A decision: PostHog exception capture, or explicitly none (comment in logger.ts either way)
  • If capture: logger.error and ErrorBoundary.onError reach PostHog on web (consent-gated) and native; a thrown test error appears in the PostHog project
  • No user identity attached to exception events unless the same consent that gates identify
  • Bundle size unchanged, verified by the source-map attribution from Bundle audit: what the 17.4 MB web entry bundle is actually made of #791

Related: #793 (Sentry removal), #794 (native consent decision), #791.

Activity

  1. added
    mobile
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Frontendmobile

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions