feat(ops): Sentry error-monitoring (v1-readiness item 2)
Vier config-files volgens Next.js 15+ conventie: - instrumentation.ts (root) → koppelt server/edge config aan runtime-hook - instrumentation-client.ts → client-init + onRouterTransitionStart - sentry.server.config.ts → node-runtime - sentry.edge.config.ts → edge-runtime (proxy.ts) next.config.ts gewrapped met withSentryConfig: - Source-map-upload ALLEEN als SENTRY_AUTH_TOKEN gezet is - Tunnel /monitoring omzeilt ad-blockers (*.sentry.io) - Silent buiten CI SDK is no-op zonder NEXT_PUBLIC_SENTRY_DSN — geen network/overhead in dev of bij ontbrekende creds. Sample-rates conservatief: errors 100%, performance 10% in productie / 100% in dev. Geen Replay (privacy-review nodig + overkill voor MVP). sendDefaultPii uit. .env.example gedocumenteerd; architectuur-doc bijgewerkt met nieuwe sleutelbeslissing en file-tree-aanvulling. v1-readiness #1 verschoven naar 'done', #2 hiermee in flight. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
70c5be6750
commit
ac11483c68
10 changed files with 2516 additions and 30 deletions
|
|
@ -86,6 +86,10 @@ scrum4me/
|
|||
│ └── seed.ts # Testdata uit Product Backlog document
|
||||
├── proxy.ts # Next.js 16 proxy voor route protection
|
||||
├── prisma.config.ts # Prisma v7 config (DATABASE_URL)
|
||||
├── instrumentation.ts # Next.js hook → koppelt Sentry-config aan runtime
|
||||
├── instrumentation-client.ts # Sentry client-init + router-transitions
|
||||
├── sentry.server.config.ts # Sentry node-runtime init (no-op zonder DSN)
|
||||
├── sentry.edge.config.ts # Sentry edge-runtime init (proxy.ts)
|
||||
└── .env.example
|
||||
```
|
||||
|
||||
|
|
@ -133,6 +137,11 @@ scrum4me/
|
|||
**Rationale:** Dialog-fullscreen op mobile op vier plekken bewaken zou drift introduceren. De gedeelde constant geeft één bron van waarheid. Het regressie-vangnet (`__tests__/components/shared/entity-dialog-layout.test.ts`) verifieert dat elke dialog deze constant blijft gebruiken.
|
||||
**Trade-off:** Eén dialog kan niet afwijken zonder de constant te verlaten — bewuste keuze voor consistentie.
|
||||
|
||||
### Beslissing: Sentry voor error-monitoring (v1-readiness item 2)
|
||||
**Keuze:** `@sentry/nextjs` met vier config-files in repo-root: `instrumentation.ts`, `instrumentation-client.ts`, `sentry.server.config.ts`, `sentry.edge.config.ts`. DSN via `NEXT_PUBLIC_SENTRY_DSN`. Zonder DSN draait de SDK als no-op — geen overhead in dev of bij ontbrekende creds in CI.
|
||||
**Rationale:** Een echte v1-launch zonder runtime-monitoring is een blinde vlek; build-fouten vangen we in CI maar productie-fouten zien we anders pas via een gebruiker. Vercel + Sentry koppelen via env-vars (geen native marketplace-integratie nodig). Source-maps uploaden alleen als `SENTRY_AUTH_TOKEN` aanwezig is — anders skip-build voor lokale dev. Tunnel-route `/monitoring` omzeilt ad-blockers die `*.sentry.io` blokkeren.
|
||||
**Trade-off:** Extra dependency (~150 KB client-bundle additioneel). Sample-rates conservatief (10% performance in productie, 100% errors). Geen Replay-integratie — vereist eigen privacy-review en is overkill voor MVP.
|
||||
|
||||
### Beslissing: Gescheiden SplitPane cookie-key voor mobile (PBI-11)
|
||||
**Keuze:** `BacklogSplitPane` op `app/(mobile)/m/products/[id]/page.tsx` gebruikt `cookieKey={\`backlog-${id}-mobile\`}` (versus desktop `backlog-${id}`).
|
||||
**Rationale:** Op mobile rendert de `SplitPane` in tab-mode (`<1024px`), waar split-percentages niet aangepast worden. Zonder gescheiden key zou dezelfde cookie hergebruikt worden — telefoon-rotaties of orientatie-wisselingen hadden anders ongewenste interactie met de desktop-split-state.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue