Observability starts with asking what you need to know during an incident.
Structured Logs
Log fields, not prose. A request log should include method, path, status, duration, and request ID.
slog.Info("request completed",
"method", r.Method,
"path", r.URL.Path,
"status", status,
"duration_ms", elapsed.Milliseconds(),
)
Metrics
Track request rate, latency, error rate, and dependency health. These four signals answer most first-response questions.
Traces
Distributed tracing is most valuable when a request crosses service boundaries. Keep span names stable and tags low-cardinality.