一键导入
crash-rate-sla
Define a crash-rate SLO, alert on it, and use breaches as automatic rollback triggers. Use this when formalising release health policy.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Define a crash-rate SLO, alert on it, and use breaches as automatic rollback triggers. Use this when formalising release health policy.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use Apple's phased release for automatic updates on iOS — behavior, pausing, resuming, and interaction with manual updates. Use this when shipping production iOS builds.
Use Play percentage rollouts and iOS phased release to limit blast radius. Use this when planning or operating a production release.
Generate keystores, enrol in Play App Signing, and understand v1/v2/v3/v4 APK signature schemes. Use this when setting up Android release signing.
Diagnose and fix common Apple and Google code-signing errors. Use this when a release build fails to sign, upload, or install.
Manage Apple certificates, provisioning profiles, automatic vs manual signing, and fastlane match. Use this when setting up iOS release signing.
Publish Android apps to Amazon Appstore, Huawei AppGallery, Samsung Galaxy Store, and deal with HMS vs GMS. Use this when targeting non-Google Android markets.
| name | crash-rate-sla |
| description | Define a crash-rate SLO, alert on it, and use breaches as automatic rollback triggers. Use this when formalising release health policy. |
A crash-rate SLA turns "is this release healthy?" from a judgement call into a policy with numeric thresholds. Write it down, alert on it, and let the alert automate rollout decisions.
| Metric | Definition | When to use |
|---|---|---|
| Crash-free sessions | Sessions without a fatal crash / total sessions | Primary SLO — sensitive to short sessions |
| Crash-free users | Users with zero crashes in window / total users | Secondary — reflects user experience |
| ANR rate (Android) | ANRs / sessions | Mandatory on Android |
| App hangs (iOS) | MetricKit hang rate | Complement to crash-free |
Choose crash-free sessions as the headline. Crash-free users is more forgiving and lags; sessions catches regressions fastest.
Baseline for consumer apps:
Adjust by app risk profile: payments/banking apps should target 99.8%+; casual games can accept 99.0% for novel features behind flags.
One page, checked into the repo at docs/release-slo.md:
# Release Health SLO
## Primary
- Crash-free sessions ≥ 99.5%, 7-day rolling, per platform.
## Secondary
- Crash-free users ≥ 99.0%.
- ANR rate ≤ 0.47% (Android).
- Cold start P95 regression ≤ 20% vs previous version.
## Breach Actions
- Any primary SLO < 99.0% for 30 min → PAGE on-call, halt rollout.
- Primary < 99.5% for 2 h → PAGE on-call.
- Secondary breach for 24 h → Slack #release, issue filed.
## Measurement
- Source: Firebase Crashlytics (cross-platform), Play Vitals (Android ANR).
- Scope: current production version only. Beta tracks tracked separately.
app_version, build_number, device_tier, os_version, country.Sentry Alerts UI or sentry-cli:
sentry-cli alerts create \
--project mobile-app \
--name "Crash-Free Sessions Breach" \
--dataset sessions \
--query 'release:1.4.2' \
--aggregate 'crash_free_rate(session)' \
--comparison '< 0.995' \
--time-window 30m \
--action pagerduty:release-oncall
// functions/index.js
exports.onCrashlyticsVelocity = functions.crashlytics.issue()
.onVelocityAlert(async (issue) => {
if (issue.appInfo.latestAppVersion !== currentReleaseVersion) return;
await pagerduty.trigger({
summary: `Velocity alert on ${issue.issueTitle}`,
severity: 'critical',
component: 'mobile-release',
});
});
Firebase's "velocity alert" fires when a single issue rises above a threshold share of sessions in a short window — often earlier than the aggregate SLO.
Wire the alert action to a webhook that halts the Play rollout:
#!/usr/bin/env bash
# halt-rollout.sh — invoked by PagerDuty webhook on SLO breach
set -euo pipefail
cd "$(dirname "$0")/.."
bundle exec fastlane supply \
--track production --rollout 0 \
--skip_upload_aab true --skip_upload_metadata true \
--json_key_data "$PLAY_SERVICE_ACCOUNT_JSON"
curl -X POST "$SLACK_WEBHOOK" \
-d "{\"text\":\":rotating_light: Auto-halted Play rollout due to SLO breach\"}"
#!/usr/bin/env bash
JWT=$(./scripts/asc-jwt.sh)
ID=$(curl -s "https://api.appstoreconnect.apple.com/v1/appStoreVersions/$VERSION_ID/appStoreVersionPhasedRelease" \
-H "Authorization: Bearer $JWT" | jq -r .data.id)
curl -X PATCH "https://api.appstoreconnect.apple.com/v1/appStoreVersionPhasedReleases/$ID" \
-H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \
-d '{"data":{"type":"appStoreVersionPhasedReleases","id":"'"$ID"'",
"attributes":{"phasedReleaseState":"PAUSED"}}}'
Compute monthly error budget: budget_minutes = (1 - 0.995) × 30 × 24 × 60 ≈ 216 minutes of sub-SLO time per month. Track burn rate; sustained high burn rate justifies slowing feature velocity to invest in stability.
Guard against:
sessions > 10_000 in the window.docs/release-slo.md written, reviewed, and agreed with product.