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
12
sentry.edge.config.ts
Normal file
12
sentry.edge.config.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// PBI/v1-readiness item 2: Sentry error-monitoring (edge runtime).
|
||||
// Edge wordt voornamelijk gebruikt door middleware (proxy.ts).
|
||||
|
||||
import * as Sentry from '@sentry/nextjs'
|
||||
|
||||
Sentry.init({
|
||||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
tracesSampleRate: process.env.NODE_ENV === 'production' ? 0.1 : 1.0,
|
||||
sendDefaultPii: false,
|
||||
enabled: !!process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||
debug: false,
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue