Skip to content

[codex] Add PostHog error tracking#125

Merged
willwearing merged 1 commit into
mainfrom
codex/posthog-error-tracking
May 5, 2026
Merged

[codex] Add PostHog error tracking#125
willwearing merged 1 commit into
mainfrom
codex/posthog-error-tracking

Conversation

@willwearing
Copy link
Copy Markdown
Owner

What changed

  • Enables PostHog exception capture in the web client and switches manual frontend error capture to captureException.
  • Adds Next.js app-router error boundaries plus onRequestError server capture for request-time errors.
  • Switches the Nest backend helper to PostHog's SDK captureException path with request context.
  • Wires PostHog source map upload for production web builds when the upload env vars are present.
  • Documents the required PostHog env vars and adds focused tests around the backend helper and frontend error helper.

Validation

  • apps/web: bun x vitest run src/lib/posthog/tests/events.test.ts
  • apps/web: bun x tsc --noEmit
  • apps/web: bun run build
  • backend: bun run test -- posthog.service.spec.ts
  • packages/shared: bun x tsc
  • backend: bun run build

Note: the first backend direct tsc attempt failed before @graspful/shared had been built locally. Building packages/shared first fixed that workspace-order issue.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graspful Ready Ready Preview, Comment May 5, 2026 5:01pm

@willwearing willwearing merged commit 2c9626c into main May 5, 2026
5 checks passed
@willwearing willwearing deleted the codex/posthog-error-tracking branch May 5, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant