Skip to main content
PensionsPortal.ie uses a combination of Sentry, Vercel observability, Cloudflare analytics, and structured application logging to provide full-stack visibility.

Monitoring Stack

Sentry

Error tracking and performance monitoring. EU region (de.sentry.io). Captures exceptions, slow transactions, and custom performance spans.

Vercel Analytics

Request metrics, function invocation times, and cold start frequency via Vercel’s built-in dashboard.

Cloudflare Analytics

Edge-level traffic, WAF block events, bot scores, and origin error rates.

Pino Structured Logs

Application-level structured JSON logs via the pino library. Logs are available via Vercel log drains.

Health Endpoints

Three health check endpoints provide operational status:
EndpointPurposeExpected Response
GET /api/health/liveLiveness probe — is the process running?200 { status: "ok" }
GET /api/health/readyReadiness probe — are dependencies available?200 if ready, 503 if not
GET /api/health/dbDatabase connectivity check200 if connected, 503 if disconnected
Health endpoints are designed to never expose internal error details. DB connection strings, environment variable names, and stack traces are explicitly excluded from health endpoint responses — verified by automated security tests.

Sentry Configuration

Sentry is initialised on three runtimes:
RuntimeConfig fileCoverage
Serversentry.server.config.tsAPI routes, server components
Edgesentry.edge.config.tsMiddleware, edge routes
Clientinstrumentation-client.tsBrowser errors, client components
Key settings:
  • DSN: routes to EU Sentry ingest (o4510862548467712.ingest.de.sentry.io)
  • Org: 137th-advisers / Project: iorp-ii-prod
  • Trace sample rate: 1.0 (100% — review for cost optimisation in high-traffic scenarios)
  • Source maps: uploaded during CI builds via SENTRY_AUTH_TOKEN
  • Tunnel route: /monitoring — proxies browser Sentry requests through the Next.js app to bypass ad-blockers
See Sentry Observability for detailed Sentry configuration.

Vercel Cron Monitors

Vercel Cron job health is automatically monitored via Sentry’s automaticVercelMonitors webpack plugin. Missed or failed cron executions trigger Sentry alerts.

Alerting

Alert TriggerChannelSeverity
Unhandled exception in productionSentry → email / SlackHigh
Error rate spike (>5% of requests)Sentry → emailHigh
DB health endpoint returns 503Uptime monitor → PagerDuty/emailCritical
Vercel function timeout spikeVercel dashboardMedium
WAF block rate spikeCloudflare → emailMedium
Configure uptime monitoring for /api/health/ready using an external monitor (e.g., Better Uptime, Checkly, or Vercel’s own cron-based checks) to receive alerts when the service is unavailable from outside Vercel.

Log Management

Structured logs are emitted via pino and pino-pretty. In production, logs flow to Vercel’s log drain. Sensitive data (PPS numbers, passwords, connection strings) must never appear in logs — this is enforced by code review and the security test suite. Log retention periods are defined in Log Retention and Integrity.