Skip to main content
PensionsPortal.ie uses Sentry for production error tracking and performance monitoring. Sentry is configured to use the EU data region (de.sentry.io), ensuring error telemetry stays within the EEA in compliance with GDPR.

Project Details

SettingValue
Organisation137th-advisers
Projectiorp-ii-prod
DSNhttps://71a9742fce52601d1c9b26656f868cb4@o4510862548467712.ingest.de.sentry.io/4510963882721360
RegionEU (de.sentry.io)

Instrumentation Coverage

Sentry instruments three separate runtimes in Next.js:
sentry.server.config.ts — initialised for all server-side request handling.
Sentry.init({
  dsn: "...",
  tracesSampleRate: 1,
  enableLogs: true,
  sendDefaultPii: true,
})
Covers: API routes, React Server Components, server actions.

Key Configuration Options

Trace Sample Rate

tracesSampleRate: 1,  // 100% of transactions
All transactions are currently sampled at 100%. In high-traffic production scenarios, consider reducing to 0.1–0.2 and using tracesSampler for dynamic sampling based on route or error status.

PII Handling

sendDefaultPii: true,
Auth.js session user IDs are sent with events, enabling Sentry’s user context feature. PPS numbers must never appear in error messages, stack traces, or event metadata. Sentry’s PII scrubbing rules should be configured in the Sentry dashboard to redact any fields matching PPS patterns.

Log Integration

enableLogs: true,
Sentry captures structured log events alongside error events, providing correlated log context for each error occurrence.

Source Maps

Source maps are uploaded to Sentry during CI builds via @sentry/nextjs’s webpack plugin:
// next.config.ts (Sentry plugin options)
widenClientFileUpload: true,
silent: !process.env.CI,
This enables readable stack traces in the Sentry UI — showing original TypeScript source lines rather than minified JavaScript. The SENTRY_AUTH_TOKEN environment variable is required in CI for source map upload. It must be a project-scoped, upload-only token — not an organisation admin token.

Tunnel Route

tunnelRoute: "/monitoring",
Browser-to-Sentry requests are proxied through /monitoring on the Next.js server. This ensures Sentry error reports are not blocked by browser ad-blockers or privacy extensions.

Vercel Cron Monitoring

webpack: {
  automaticVercelMonitors: true,
}
Sentry automatically creates cron monitors for Vercel Cron jobs. Missed executions or failures trigger Sentry alerts.

Alerts and Notifications

Configure the following alert rules in the Sentry dashboard:
AlertConditionChannel
New issueAny unhandled exceptionEmail + Slack
Issue regressionPreviously resolved issue recursEmail
Error rate>5% of requests in 5 min windowEmail + PagerDuty
Performance degradationP95 latency exceeds SLO thresholdEmail

Debug Logging

Sentry’s own debug logging is tree-shaken from production builds:
treeshake: {
  removeDebugLogging: true,
}
This reduces bundle size and avoids verbose Sentry internal logs in production.