> ## 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.

# Phase 2 & 3: Error Handling & Monitoring Expansion — Integration

> PF-07 Phase 2 wires the Phase 1 monitoring infrastructure into the app (global and feature-level error boundaries, auth logging, performance monitoring). Phase…

**Feature ID:** PF-07 (Phase 2 & 3)\
**Spec:** [PF-07-error-handling-monitoring.md](https://github.com/Encore-OS/encoreos/blob/development/specs/pf/specs/PF-07-error-handling-monitoring.md)\
**Expansion Spec:** [PF-07-PHASE-2-3-EXPANSION.md](https://github.com/Encore-OS/encoreos/blob/development/specs/pf/specs/PF-07-PHASE-2-3-EXPANSION.md)\
**Last Updated:** 2026-03-11

***

## Overview

PF-07 Phase 2 wires the Phase 1 monitoring infrastructure into the app (global and feature-level error boundaries, auth logging, performance monitoring). Phase 3 adds external error tracking (Sentry or equivalent), alerting rules, and monitoring dashboards. This doc summarizes integration points implemented by the expansion.

***

## Integration Points (from Expansion Spec)

| Direction         | Consumer / Provider        | Pattern               | Purpose                                                                                                                             |
| ----------------- | -------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| PF-07 → All Cores | RH, FA, HR, GR, FW, FM, CL | Platform Layer        | Feature-level error boundaries; each core wraps its module with boundary and fallback UI.                                           |
| PF-07 → App       | Root layout / App          | Platform Layer        | Global error boundary wraps `<App />`; fallback UI and logging.                                                                     |
| PF-07 → Auth      | Auth flows                 | Platform Layer        | Structured logger in login, logout, session refresh; correlation ID.                                                                |
| PF-07 → External  | Sentry (or equivalent)     | API / SDK             | Phase 3: error capture, grouping, source maps, release tracking; no PHI in payloads.                                                |
| PF-36 → PF-07     | System Health Dashboard    | Platform Layer / Data | PF-36 consumes PF-07 metrics and patterns; see [PF-36 Integration](/architecture/integrations/system-health-dashboard-integration). |

***

## Platform Layer Usage

* **Error boundaries:** Global boundary in root layout or `App.tsx`; feature boundaries in core module roots (RH, FA, HR, GR, FW, FM, CL).
* **Logging:** Use platform logger in auth flows; no PHI; correlation ID on login, logout, session refresh.
* **Performance:** Performance monitor enabled app-wide; LCP, FID, CLS and navigation timing collected; no PII in metrics.

***

## Related Docs

* [PF-36 System Health Dashboard Integration](/architecture/integrations/system-health-dashboard-integration) — consumes PF-07 for metrics and patterns.
* Parent spec: [PF-07 Error Handling & Monitoring](https://github.com/Encore-OS/encoreos/blob/development/specs/pf/specs/PF-07-error-handling-monitoring.md).
