Status: ✅ CompleteDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
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
| Export | Type | Description |
|---|---|---|
ErrorBoundary | Component | React error boundary with global, feature, component levels |
logger | Singleton | Structured logger (info/warn/error/critical) with context |
performanceMonitor | Singleton | Custom marks, page load timing, API histograms |
initSentry | Function | One-time Sentry SDK initialization (called in instrument.ts) |
@/platform/monitoring
Integration Points
All Cores → PF-07
Every core uses:loggerfor structured logging (module prefix identifies the core)ErrorBoundaryfor crash isolationsanitizeErrorMessage()(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
beforeSendbefore events leave the browser - Source maps are uploaded via
@sentry/vite-pluginduring CI/CD
PF-07 → pf_health_metrics
performanceMonitorflushes page load, custom mark, and API metrics topf_health_metricsin Supabase
Cross-Core Dependencies
| Core | Dependency | Direction |
|---|---|---|
| All cores | @/platform/monitoring | Consumer |
| PF (auth) | logger + correlation_id | Auth events logged with correlation |
| PF (routes) | ErrorBoundary level="feature" | Route-level crash isolation |
Related Documents
- MONITORING_RUNBOOK.md — Operational procedures
- Developer Guide: monitoring.md — Developer usage guide
- PF-07 Spec — Expansion spec