Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Status: ✅ Complete
Last Updated: 2026-03-14

Overview

PF-07 provides platform-wide error handling, structured logging, and performance monitoring infrastructure. All cores consume these services through the @/platform/monitoring barrel.

Exported APIs

ExportTypeDescription
ErrorBoundaryComponentReact error boundary with global, feature, component levels
loggerSingletonStructured logger (info/warn/error/critical) with context
performanceMonitorSingletonCustom marks, page load timing, API histograms
initSentryFunctionOne-time Sentry SDK initialization (called in instrument.ts)
Import path: @/platform/monitoring

Integration Points

All Cores → PF-07

Every core uses:
  • logger for structured logging (module prefix identifies the core)
  • ErrorBoundary for crash isolation
  • sanitizeErrorMessage() (from @/shared/lib/error-utils) for user-facing errors

PF-07 → Sentry

  • Errors, traces, replays, and structured logs are sent to Sentry
  • PHI is scrubbed in beforeSend before events leave the browser
  • Source maps are uploaded via @sentry/vite-plugin during CI/CD

PF-07 → pf_health_metrics

  • performanceMonitor flushes page load, custom mark, and API metrics to pf_health_metrics in Supabase

Cross-Core Dependencies

CoreDependencyDirection
All cores@/platform/monitoringConsumer
PF (auth)logger + correlation_idAuth events logged with correlation
PF (routes)ErrorBoundary level="feature"Route-level crash isolation