observability-and-errors

Installation
SKILL.md

Observability & Errors

Overview

You can't fix what you can't see. A production SaaS needs three signals: error tracking (Sentry) for exceptions with stack + context, structured logs (JSON with a correlation id) for tracing a request, and product analytics (PostHog) for what users actually do. Add a global error boundary, attach tenant/user/request context to every signal, and scrub secrets and PII before anything leaves the process.

When to use

  • Standing up a new app's logging/monitoring.
  • Debugging issues you can't reproduce locally.
  • You need to know which features are used or where users drop off.

Structured logging with context

// src/server/log.ts
import "server-only";
Installs
5
GitHub Stars
2
First Seen
Jun 18, 2026