Mobile vitals
Mobile Vitals
Turn on/off specific Mobile Vitals, default to all trues. Each Mobile Vitals is responsible for which data the SDK will track and collect for you.
Note: ANR is controlled separately via the instrumentations option, not as a mobile vital.
let options = CoralogixExporterOptions(coralogixDomain: CORALOGIX-DOMAIN,
environment: "ENVIRONMENT",
application: "APP-NAME",
version: "APP-VERSION",
publicKey: "API-KEY",
mobileVitals: [.cpuDetector: true,
.warmDetector: true,
.coldDetector: true,
.slowFrozenFramesDetector: true,
.memoryDetector: true,
.renderingDetector: true])
Mobile Vitals Sampling Intervals
Mobile vitals are sampled at fixed, battery-optimized intervals:
- FPS: Continuous per-frame tracking via CADisplayLink (~60Hz) with 1-second aggregation/reporting
- CPU: 1 second
- Memory: 1 second
These intervals are optimized for battery efficiency while capturing all important performance trends. The 1-second sampling provides accurate statistics (min/max/avg/p95) for monitoring without excessive battery drain.
Note
Prior to v2.2.0, the SDK exposed (non-functional) configuration parameters for these intervals. These have been removed as they were never actually used.
Understanding Mobile Vitals Metrics
Memory Utilization:
- Calculated as:
(app footprint / total device physical RAM) × 100% - Example: 500MB footprint on 6GB device = 8.3%
- Note: iOS reserves 1-2GB for system processes, so practical app maximum is typically 70-80%
- Apps exceeding ~80% utilization risk receiving memory warnings from iOS and may be terminated if memory pressure continues
- The SDK reports utilization relative to total device capacity (matching iOS Instruments behavior)
- Edge case: Values >100% are theoretically impossible but the cap was removed to surface measurement anomalies. If you observe >100% readings, treat them as flags for investigation (likely indicating measurement timing issues, device reporting quirks, or transient OS behavior) rather than literal memory usage
Slow and Frozen Frames:
- Slow frames: Frame render time exceeds expected budget + 3% tolerance (e.g., >17.2ms on 60Hz display)
- Frozen frames: Frame render time >= 700ms (causes perceivable UI freeze)
- The 700ms frozen frame threshold aligns with ANR detection, providing consistent "unresponsive UI" definition across the SDK
- Thresholds automatically adapt to display refresh rate (60Hz standard, 120Hz ProMotion)
- Industry thresholds range from 250ms (very sensitive) to 700ms (severe freezes only); 700ms aligns with ANR
Last updated on