|
| 1 | +# Zoom Integration Performance Monitoring |
| 2 | + |
| 3 | +This document details the Zoom Integration Performance Monitoring feature implemented in the TeachLink platform. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The Zoom Integration Performance Monitoring tracks real-time performance metrics of the Zoom Web Client SDK and REST API. This system allows administrators to proactively identify connection degradation, API outages, and SDK load issues that affect live online classes. |
| 8 | + |
| 9 | +## Tracked Metrics |
| 10 | + |
| 11 | +The monitoring system registers and evaluates the following Zoom-related performance metrics: |
| 12 | + |
| 13 | +| Metric Name | Description | Good | Warning | Critical | Unit | |
| 14 | +| :----------------------- | :-------------------------------- | :-------- | :------- | :------- | :--- | |
| 15 | +| `zoom_api_latency` | REST API endpoint response time | <= 400ms | > 400ms | > 600ms | ms | |
| 16 | +| `zoom_api_error_rate` | Failed API requests ratio | <= 2% | > 2% | > 4% | % | |
| 17 | +| `zoom_sdk_load_time` | Client SDK asset loading duration | <= 1800ms | > 1800ms | > 2500ms | ms | |
| 18 | +| `zoom_connection_jitter` | Meeting network connection jitter | <= 15ms | > 15ms | > 30ms | ms | |
| 19 | +| `zoom_packet_loss` | Network packet loss percentage | <= 1.5% | > 1.5% | > 3% | % | |
| 20 | + |
| 21 | +## Architecture & Integration Points |
| 22 | + |
| 23 | +1. **Telemetry API Endpoint** |
| 24 | + |
| 25 | + - Location: `src/app/api/performance/zoom-metrics/route.ts` |
| 26 | + - Exposes mock real-time telemetry representing live Web Client SDK sessions and REST APIs. |
| 27 | + |
| 28 | +2. **Metrics Collection Provider** |
| 29 | + |
| 30 | + - Location: `src/lib/monitoring/provider.ts` (`LocalMonitoringProvider`) |
| 31 | + - Queries the API endpoint and merges it with Core Web Vitals and DB connection pool metrics. |
| 32 | + |
| 33 | +3. **Alert Evaluation Rules** |
| 34 | + |
| 35 | + - Location: `src/lib/monitoring/alerts.ts` (`checkAlerts`) |
| 36 | + - Checks threshold metrics and appends warning or critical alerts when limits are crossed. |
| 37 | + |
| 38 | +4. **Performance Dashboard UI** |
| 39 | + - Location: `src/components/performance/PerformanceDashboard.tsx` |
| 40 | + - Visualizes live statuses using reactive widgets, pulsing indicator status, cards with rating tags, and connection component diagnostics. |
| 41 | + |
| 42 | +## Verification |
| 43 | + |
| 44 | +### Unit and Integration Tests |
| 45 | + |
| 46 | +Unit tests are available at [zoom.test.ts](file:///c:/Users/JOTEL/OneDrive/Documentos/teachLink_web/src/lib/monitoring/__tests__/zoom.test.ts). |
| 47 | + |
| 48 | +Run tests with: |
| 49 | + |
| 50 | +```bash |
| 51 | +npx pnpm test src/lib/monitoring/__tests__/zoom.test.ts |
| 52 | +``` |
0 commit comments