โหมดมืด
Observability
ส่วนหนึ่งของ Beginner Book | เสริมจาก DevOps บทที่ 07
หนังสือเล่มนี้พาคุณไปถึงไหน
อ่านจบ + ทำ checkpoint หมด คุณจะ:
- เข้าใจ "ดู production ยังไง" — observability mindset
- ทำ structured logging ที่ search ได้จริง
- เขียน metric + dashboard + alert ที่ใช้งานได้
- ทำ distributed tracing ข้าม service
- ตั้ง SLI / SLO / error budget
- Run incident + เขียน postmortem แบบ blameless
- Optimize cost ของ observability
⚠️ DevOps บทที่ 07 เป็น overview สั้น ๆ — เล่มนี้ลึกกว่ามาก + เน้น practical pattern
หนังสือนี้ออกแบบมาให้ใคร
✅ Backend / Full-stack developer ที่ deploy app เอง
✅ SRE / DevOps มือใหม่
✅ On-call engineer ที่อยากปวดหัวน้อยลง
❌ Senior SRE ที่ทำ chaos engineering[^chaos] ระดับ Google scale
[^chaos]: chaos engineering = จงใจ inject failure ใน production เพื่อทดสอบความทนทาน — ตัวอย่าง Netflix Chaos Monkey (อ่านทีหลังได้ ไม่ต้องเข้าใจตอนเริ่ม)
หนังสือออกแบบให้อ่านอย่างไร
แต่ละบทเดินตามลำดับ — เพราะ concept ต่อกัน
ลงมือทำ checkpoint = สำคัญที่สุด (observability = skill ลงมือ ไม่ใช่ทฤษฎี)
บทเรียน
| # | บท | สอนอะไร |
|---|---|---|
| 0 | Observability Mindset | 3 pillars, monitoring vs observability, SRE culture, "unknown unknowns" |
| 1 | Logging ลึก | Structured logging, MDC, sampling, log queries (LogQL), retention strategy |
| 2 | Metrics + Prometheus ลึก | Counter/Gauge/Histogram, PromQL advanced, cardinality trap, RED/USE |
| 3 | Distributed Tracing | OpenTelemetry, sampling strategies, trace analysis, debugging with traces |
| 4 | Dashboard Design | Grafana, dashboard for who?, golden signals, anti-patterns |
| 5 | Alerting + On-Call | Alert philosophy, fatigue prevention, runbooks, on-call rotation |
| 6 | SLI / SLO / Error Budget | Define SLO, calculate budget, burn rate alerts, error budget policy |
| 7 | Incident + Postmortem | Incident command, blameless postmortem, lessons learned, action items |
| 8 | Loki + LogQL | Architecture, agent (Promtail/Alloy), LogQL, cardinality, retention, tuning |
| 9 | Elasticsearch for Logs | ELK stack, ILM, mapping, Query DSL, hot-warm-cold, Loki vs ES |
📝 หมายเหตุภาษา code example: บท 0-7 ยกตัวอย่างฝั่ง Java/Spring เป็นหลัก · บท 8-9 ตัวอย่างเอนไปทาง Node.js (Pino/NestJS/Express) — concept เหมือนกัน แค่เปลี่ยน logging library ตามภาษา · ผู้อ่าน Spring ที่ต้องการ Logback JSON encoder ดูบท 1 §4
💡 มือใหม่ที่ใช้ Java อย่างเดียว — ไม่ต้องอ่านบท 8-9 ตอนแรก กลับมาเมื่อต้องการ
Glossary: ../glossary.md · Style guide: ../CONTRIBUTING.md last_verified: 2026-06-03 · review report: ../REVIEW-2026-06-03.md