Error Predictions
Gurulu uses statistical analysis to predict error trends, score deploy risk, and forecast spikes before they happen. Predictions are based on linear regression over historical error data.
Trend analysis
Linear regression is applied to error count time series to extrapolate future values. The model uses a configurable lookback window (default: 7 days) and projects forward with confidence intervals.
Linear Regression Model:
y = mx + b
y = predicted error count
x = time (hours from now)
m = slope (errors per hour trend)
b = current baseline
Confidence band = prediction +/- (z * standard_error)
z = 1.96 for 95% confidence intervalDeploy risk scoring
After each deployment, Gurulu calculates a risk score (0-100) based on multiple weighted factors:
- 0-25 (Low) -- no significant error changes detected. Safe to proceed.
- 26-50 (Medium) -- minor error increases observed. Monitor for the next hour.
- 51-75 (High) -- significant error increases or new error groups detected. Consider staged rollout.
- 76-100 (Critical) -- severe error spike or critical path affected. Rollback recommended.
{
"release": "v2.4.1",
"riskScore": 72,
"riskLevel": "high",
"factors": [
{ "name": "new_error_groups", "count": 3, "weight": 0.4 },
{ "name": "error_rate_increase", "percent": 15.2, "weight": 0.3 },
{ "name": "affected_users_increase", "percent": 8.1, "weight": 0.2 },
{ "name": "critical_path_errors", "count": 1, "weight": 0.1 }
],
"recommendation": "Monitor closely. Consider staged rollout."
}Spike prediction
When the trend line projects a significant increase within the next 24 hours, Gurulu generates a spike prediction with the estimated time and magnitude:
{
"predictions": [
{
"errorGroup": "ChunkLoadError",
"currentRate": 12,
"predictedRate": 45,
"predictedAt": "2026-04-19T14:00:00Z",
"confidence": 0.87,
"basedOn": "7d_trend"
}
]
}Confidence intervals
Every prediction includes a confidence interval indicating the reliability of the estimate:
- 90% CI -- wider band, higher certainty that the actual value falls within the range.
- 95% CI -- default setting. Good balance between precision and reliability.
- 99% CI -- very wide band. Used for critical alerting thresholds.
API access
# Get trend prediction for an error group
curl https://gurulu.io/api/v1/errors/predictions \
-H "Authorization: Bearer gsk_live_..." \
-d '{"siteId": "YOUR_SITE_ID", "window": "24h", "confidence": 0.95}'
# Get deploy risk score
curl https://gurulu.io/api/v1/errors/deploy-risk \
-H "Authorization: Bearer gsk_live_..." \
-d '{"siteId": "YOUR_SITE_ID", "release": "v2.4.1"}'Related features: Stability and Revenue Impact.