go.missing_correlation_id
Observability
Low
Detects HTTP handlers that don’t propagate correlation IDs for distributed tracing.
Why It Matters
Section titled “Why It Matters”Without correlation IDs:
- Can’t trace requests — Logs across services can’t be correlated
- Debugging nightmare — Finding related events is manual work
- Slow incident response — More time spent correlating logs
Example
Section titled “Example”// ❌ Before (no correlation ID)func handler(w http.ResponseWriter, r *http.Request) { log.Println("Processing request")}// ✅ After (with correlation ID)func handler(w http.ResponseWriter, r *http.Request) { correlationID := r.Header.Get("X-Correlation-ID") if correlationID == "" { correlationID = uuid.New().String() }
ctx := context.WithValue(r.Context(), "correlation_id", correlationID) log.Printf("Processing request correlation_id=%s", correlationID)
w.Header().Set("X-Correlation-ID", correlationID)}What Unfault Detects
Section titled “What Unfault Detects”- HTTP handlers without correlation ID extraction
- Log statements without correlation IDs
- Outgoing requests without ID forwarding