Observability

Error Capture

How error capture works with Cloudflare Workers Observability.

@repo/observability captures errors as structured JSON on console.error. On Cloudflare Workers those lines appear in Workers Observability (dashboard logs, Logpush, Tail Workers). There is no third-party APM (Sentry/Logtail) in this stack.

Configuration

  • App instrumentation.ts imports @repo/observability/instrumentation (no-op bootstrap; Workers Observability is platform-side).
  • next.config.ts may still call withSentry / withLogging from @repo/observability/next-config — both are identity wrappers kept for API stability after the Vercel cutover.
  • Enable observability.enabled in each app wrangler.jsonc.

Manual Usage

Prefer the package helpers so every app emits the same shape:

page.tsx
import { log } from "@repo/observability/log";

log.error("checkout.failed", { orderId: "…", reason: "…" });

Or, for a thrown value at a boundary:

global-error.tsx
console.error(
  JSON.stringify({
    event: "observability.global_error",
    message: error.message,
    digest: error.digest,
  })
);

What was removed

Sentry DSN tunneling, source-map upload, Logtail transport, and Better Stack status widgets were removed as part of the Cloudflare-only observability requirement (epic #235, 2026-07-30).

On this page

GitHubEdit this page on GitHub