comparar · Observability
Both work with Next.js. In a kit you pick one, and your agent gets the rule to use only that one.
| PostHog | Sentry | |
|---|---|---|
| What it is | Product analytics, funnels, session replay and feature flags. | Errors, traces and performance on client, server and edge. |
| Frameworks | Next.js | Next.js |
| Paquetes | posthog-js posthog-node | @sentry/nextjs |
| Skill oficial | posthog/ai-plugin@instrument-product-analytics | getsentry/sentry-for-ai@sentry-nextjs-sdk |
| How your agent uses it | Track product events with `capture("event", { ...props })`. Name events in snake_case with a past-tense verb (`signup_completed`, `kit_installed`) and identify the user with `identify(id)` after login. Never send sensitive personal data as properties. On the client: `import posthog from "posthog-js"`; on the server: `getPostHogServer()` from `@/lib/posthog-server` (call `await client.shutdown()` when done). | Unhandled errors are reported automatically. For errors you catch, use `Sentry.captureException(error)` and add context with `Sentry.setUser` / `Sentry.setTag`. Never leave `console.error` as the only signal of a production failure. |
| Kits that offer it | landing-next, saas-ai-next, saas-next-better-auth, saas-next-supabase, saas-t3, waitlist-next | landing-next, saas-ai-next, saas-next-better-auth, saas-next-supabase, saas-t3, waitlist-next |
| Chosen in | 0 installs | 0 installs |