Skip to content

Day 147 — Week 1 Review + Recall

Month 6 · Week 1 · ⬅ Day 146 · Day 148 ➡ · Journal index

🎯 Learning Objective

Consolidate the observability week — logging, metrics, tracing, health, correlation, alerting — with active recall, and capture gaps before Week 2.

📚 Topics

  • Spaced repetition across Days 141–146
  • Week retro → see the full Week 1 review

📖 Reading / Sources

📝 Notes

  • The week's spine: logs (events, slog), metrics (aggregates, Prometheus), traces (causality, OTel) — the three pillars, tied together by a shared correlation/trace-id → [[observability]].
  • Health probes split into liveness (restart) vs readiness (drain); never check deps in liveness.
  • Alerting is symptom- and SLO-based, not cause-based.
  • Full retro, re-quiz, action items, and metrics live in the week review file → Week 1 review.

💻 Code Examples

// The week in one wiring: structured logger + context correlation ID.
logger := slog.New(ctxHandler{slog.NewJSONHandler(os.Stdout, nil)})
logger.InfoContext(ctx, "request done", slog.Int("status", 200)) // request_id auto-stamped

Examples built this week: slog, tracecontext, healthcheck, correlation.

🏋️ Exercises / Practice

Exercise Status Link
traceparent exercises/month-06/week-1/traceparent
health exercises/month-06/week-1/health
redact exercises/month-06/week-1/redact

🐛 Mistakes Made

  • Conflated logs/metrics/traces early in the week; the "three pillars + shared ID" framing fixed it.

❓ Open Questions

  • How much of this stack to actually wire into the Month 5 capstone vs. keep as concepts? (Decide in Week 2.)

🧠 Active Recall (answer without looking)

  1. Q: Name the three pillars of observability and what each is best at.
    A

Logs — discrete events with rich detail; Metrics — cheap aggregates over time (rates, quantiles); Traces — causal, cross-service request timelines. A shared trace/correlation ID pivots between them. 2. Q: Which metric type for latency, and why not a Summary?

A

A Histogram — its buckets aggregate across replicas via histogram_quantile(). Summaries compute quantiles client-side per instance and can't be merged.

🪶 Feynman Reflection

This week was about making a running service legible: it should tell you what it's doing (logs), how much and how fast (metrics), where time went across services (traces), whether it's healthy (probes), and shout only when users actually hurt (SLO alerts).

🕳️ Knowledge Gaps

  • End-to-end wiring of all signals into one service with a real collector — next week's project work.

✅ Summary

Observability week consolidated: I can structure logs, pick and expose metrics, propagate traces, serve correct health probes, correlate by ID, and design actionable alerts.

⏭️ Next Steps / Prep for Tomorrow

  • Day 148: start Week 2 — wire observability into the capstone / next production topic.

Time spent Difficulty Confidence
90 min 🟦⬜⬜⬜⬜ 🟦🟦🟦🟦⬜

Suggested commit: docs(journal): month 6 week 1 review + recall (day 147)