Docs For AI
Monitoring

Monitoring Overview

Frontend monitoring - error tracking, real user monitoring, and observability

Frontend Monitoring

Frontend monitoring is essential for understanding application health, user experience, and identifying issues before they impact users.

Key Areas

AreaPurposeKey Metrics
Error TrackingCapture and diagnose errorsError rate, stack traces, affected users
Real User Monitoring (RUM)Measure actual user experienceCore Web Vitals, page load times
Synthetic MonitoringProactive testingUptime, response times
LoggingDebug and audit trailLog volume, error patterns

Core Web Vitals

Google's Core Web Vitals are critical metrics that affect both UX and SEO:

MetricDescriptionGood Threshold
LCP (Largest Contentful Paint)Loading performance< 2.5s
INP (Interaction to Next Paint)Interactivity< 200ms
CLS (Cumulative Layout Shift)Visual stability< 0.1

Four Golden Signals

Essential signals for monitoring any distributed system:

SignalDescriptionFrontend Example
LatencyTime to complete requestsAPI response time, page load
TrafficAmount of demandPage views, API calls
ErrorsRate of failed requestsJS errors, failed fetches
SaturationResource utilizationMemory usage, CPU load

Monitoring Strategy

┌─────────────────────────────────────────────────────────────┐
│                    Frontend Monitoring                       │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐      │
│  │    Error     │  │     RUM      │  │  Synthetic   │      │
│  │   Tracking   │  │  Monitoring  │  │  Monitoring  │      │
│  │              │  │              │  │              │      │
│  │ • Exceptions │  │ • Web Vitals │  │ • Uptime     │      │
│  │ • Crashes    │  │ • Page Load  │  │ • Smoke Test │      │
│  │ • Breadcrumbs│  │ • User Flow  │  │ • Regression │      │
│  └──────────────┘  └──────────────┘  └──────────────┘      │
│         │                 │                 │               │
│         └─────────────────┼─────────────────┘               │
│                           ▼                                 │
│                  ┌──────────────┐                           │
│                  │   Alerting   │                           │
│                  │   & Alerts   │                           │
│                  └──────────────┘                           │
│                           │                                 │
│                           ▼                                 │
│                  ┌──────────────┐                           │
│                  │  Dashboards  │                           │
│                  │  & Reports   │                           │
│                  └──────────────┘                           │
└─────────────────────────────────────────────────────────────┘

Implementation Checklist

  • Set up error tracking (Sentry, Bugsnag, etc.)
  • Implement RUM for Core Web Vitals
  • Configure alerting thresholds
  • Create monitoring dashboards
  • Set up synthetic monitoring for critical paths
  • Document incident response procedures

On this page