Stability

Stability metrics provide a session-based view of your application's reliability. Track crash-free session rates, compare releases, and set minimum stability thresholds.

Crash-free session rate

The primary stability metric counts the percentage of sessions that completed without encountering an unhandled error:

Crash-Free Session Rate = (Total Sessions - Sessions with Errors) / Total Sessions x 100

Example:
  Total sessions: 10,000
  Sessions with unhandled errors: 15
  Crash-free rate: (10000 - 15) / 10000 x 100 = 99.85%

Only unhandled exceptions and unhandled promise rejections count against stability. Manually captured errors and console errors are excluded by default.

Release comparison

Compare stability metrics between releases to detect regressions. The comparison shows crash-free rates, new error groups, and a delta status:

release-comparison.json
{
  "comparison": {
    "current": {
      "release": "v2.4.1",
      "crashFreeRate": 99.85,
      "totalSessions": 10000,
      "errorGroups": 12,
      "newErrors": 2
    },
    "previous": {
      "release": "v2.4.0",
      "crashFreeRate": 99.92,
      "totalSessions": 9800,
      "errorGroups": 10,
      "newErrors": 0
    },
    "delta": {
      "crashFreeRate": -0.07,
      "errorGroupsDelta": 2,
      "status": "regressed"
    }
  }
}

Stability trends

Track stability over time with configurable trend views:

  • 7-day trend -- shows daily crash-free rates for the past week. Good for spotting recent changes.
  • 30-day trend -- shows weekly averages for the past month. Better for long-term tracking.
  • Per-release trend -- plots crash-free rate for each release chronologically. Identifies which releases improved or degraded stability.

Threshold configuration

Set warning and critical thresholds for crash-free rates. Alerts are triggered when the rate drops below the configured levels:

stability-thresholds.json
{
  "thresholds": {
    "crashFreeTarget": 99.9,
    "warningLevel": 99.5,
    "criticalLevel": 99.0,
    "evaluationWindow": "24h",
    "alertChannels": {
      "warning": ["email"],
      "critical": ["slack", "webhook"]
    }
  }
}

Session-level metrics

The stability dashboard tracks these session-level metrics:

  • Crash-free session rate (primary SLI)
  • Error rate per 1,000 sessions
  • Mean time to detection (MTTD)
  • Mean time to resolution (MTTR)
  • Unique users affected by errors

CLI commands

# View current stability score
gurulu stability status --site-id YOUR_SITE_ID

# Compare releases
gurulu stability compare --site-id YOUR_SITE_ID \
  --current v2.4.1 --previous v2.4.0

# View stability trend
gurulu stability trend --site-id YOUR_SITE_ID --window 30d

Related features: Error Budgets and Self-Healing.