监控和可观测性是 CI/CD 的必要补充 — 由于 CI/CD 频繁部署更改,你需要观察它们对生产的影响,以便迅速捕获问题、验证部署,并实现自动回滚和渐进式交付等安全实践。
为什么监控对 CI/CD 很重要
text
CI/CD deploys changes FREQUENTLY → you must KNOW their impact in production:
→ did the deployment cause errors, slowdowns, or failures?
→ fast deployment NEEDS fast detection (so problems are caught quickly, not by users)
→ "deploy and watch" — monitoring closes the loop on each deployment
→ Frequent deployment without monitoring = flying blind (problems go unnoticed).
部署周围要监控的内容
text
✓ ERROR RATES — did errors spike after the deploy? (a key signal)
✓ PERFORMANCE — latency, response times (did it get slower?)
✓ Health checks / availability — is the service healthy?
✓ Business/key metrics — did the change affect important outcomes?
✓ LOGS and traces — diagnose issues when they appear
→ Compare before/after a deployment to detect regressions.
