canary-watch
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCanary Watch — Post-Deploy Monitoring
Canary Watch — 部署后监控
When to Use
适用场景
- After deploying to production or staging
- After merging a risky PR
- When you want to verify a fix actually fixed it
- Continuous monitoring during a launch window
- After dependency upgrades
- 部署到生产或预发环境后
- 合并高风险PR之后
- 需要验证修复是否真的生效时
- 发布窗口期内的持续监控
- 依赖升级之后
How It Works
工作原理
Monitors a deployed URL for regressions. Runs in a loop until stopped or until the watch window expires.
监控已部署的URL是否存在回归问题。循环运行,直到手动停止或监控窗口过期。
What It Watches
监控项
1. HTTP Status — is the page returning 200?
2. Console Errors — new errors that weren't there before?
3. Network Failures — failed API calls, 5xx responses?
4. Performance — LCP/CLS/INP regression vs baseline?
5. Content — did key elements disappear? (h1, nav, footer, CTA)
6. API Health — are critical endpoints responding within SLA?1. HTTP Status — is the page returning 200?
2. Console Errors — new errors that weren't there before?
3. Network Failures — failed API calls, 5xx responses?
4. Performance — LCP/CLS/INP regression vs baseline?
5. Content — did key elements disappear? (h1, nav, footer, CTA)
6. API Health — are critical endpoints responding within SLA?Watch Modes
监控模式
Quick check (default): single pass, report results
/canary-watch https://myapp.comSustained watch: check every N minutes for M hours
/canary-watch https://myapp.com --interval 5m --duration 2hDiff mode: compare staging vs production
/canary-watch --compare https://staging.myapp.com https://myapp.com快速检查(默认):单次运行,输出结果
/canary-watch https://myapp.com持续监控:每隔N分钟检查一次,持续M小时
/canary-watch https://myapp.com --interval 5m --duration 2h对比模式:对比预发环境与生产环境
/canary-watch --compare https://staging.myapp.com https://myapp.comAlert Thresholds
告警阈值
yaml
critical: # immediate alert
- HTTP status != 200
- Console error count > 5 (new errors only)
- LCP > 4s
- API endpoint returns 5xx
warning: # flag in report
- LCP increased > 500ms from baseline
- CLS > 0.1
- New console warnings
- Response time > 2x baseline
info: # log only
- Minor performance variance
- New network requests (third-party scripts added?)yaml
critical: # immediate alert
- HTTP status != 200
- Console error count > 5 (new errors only)
- LCP > 4s
- API endpoint returns 5xx
warning: # flag in report
- LCP increased > 500ms from baseline
- CLS > 0.1
- New console warnings
- Response time > 2x baseline
info: # log only
- Minor performance variance
- New network requests (third-party scripts added?)Notifications
通知机制
When a critical threshold is crossed:
- Desktop notification (macOS/Linux)
- Optional: Slack/Discord webhook
- Log to
~/.claude/canary-watch.log
触发严重阈值时:
- 桌面通知(macOS/Linux)
- 可选:Slack/Discord webhook
- 日志写入
~/.claude/canary-watch.log
Output
输出示例
markdown
undefinedmarkdown
undefinedCanary Report — myapp.com — 2026-03-23 03:15 PST
Canary Report — myapp.com — 2026-03-23 03:15 PST
Status: HEALTHY ✓
Status: HEALTHY ✓
| Check | Result | Baseline | Delta |
|---|---|---|---|
| HTTP | 200 ✓ | 200 | — |
| Console errors | 0 ✓ | 0 | — |
| LCP | 1.8s ✓ | 1.6s | +200ms |
| CLS | 0.01 ✓ | 0.01 | — |
| API /health | 145ms ✓ | 120ms | +25ms |
| Check | Result | Baseline | Delta |
|---|---|---|---|
| HTTP | 200 ✓ | 200 | — |
| Console errors | 0 ✓ | 0 | — |
| LCP | 1.8s ✓ | 1.6s | +200ms |
| CLS | 0.01 ✓ | 0.01 | — |
| API /health | 145ms ✓ | 120ms | +25ms |
No regressions detected. Deploy is clean.
No regressions detected. Deploy is clean.
undefinedundefinedIntegration
集成方式
Pair with:
- for pre-deploy verification
/browser-qa - Hooks: add as a PostToolUse hook on to auto-check after deploys
git push - CI: run in GitHub Actions after deploy step
可搭配使用:
- 用于部署前验证
/browser-qa - 钩子:作为 的 PostToolUse 钩子,在部署后自动执行检查
git push - CI:在 GitHub Actions 部署步骤完成后运行