comparar · Observability
Both work with Bun. In a kit you pick one, and your agent gets the rule to use only that one.
| PostHog | Sentry | |
|---|---|---|
| What it is | Events and feature flags from your API. | Errors and traces for your Bun API. |
| Frameworks | Node.js, Bun, Workers | Bun |
| Paquetes | posthog-node | @sentry/bun |
| Skill oficial | posthog/ai-plugin@instrument-product-analytics | getsentry/sentry-for-ai@sentry-node-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. Use `getPostHog()` from `src/lib/posthog.ts` and call `await client.shutdown()` at the end of each request in serverless environments. | 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 | api-hono, discord-bot, mcp-server-ts | api-hono |
| Chosen in | 0 installs | 0 installs |