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.tsimports@repo/observability/instrumentation(no-op bootstrap; Workers Observability is platform-side). next.config.tsmay still callwithSentry/withLoggingfrom@repo/observability/next-config— both are identity wrappers kept for API stability after the Vercel cutover.- Enable
observability.enabledin each appwrangler.jsonc.
Manual Usage
Prefer the package helpers so every app emits the same shape:
import { log } from "@repo/observability/log";
log.error("checkout.failed", { orderId: "…", reason: "…" });Or, for a thrown value at a boundary:
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).