Skip to main content

Observability

Paved Path

  • Errors: Sentry (FE + BE) + Web Vitals
  • Logging (BE): pino → GCP Cloud Logging
  • Metrics: OpenTelemetry → GCP Monitoring
  • Tracing: OpenTelemetry → GCP Cloud Trace

Sentry init example:

import * as Sentry from '@sentry/nextjs';
Sentry.init({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 0.2 });

Pino logger:

import pino from 'pino';
export const log = pino({ level: process.env.LOG_LEVEL || 'info' });

LLM Notes

  • Always add logging and error handling in new endpoints; include correlation IDs if available.