Commit Graph
1 Commits
Author SHA1 Message Date
argoyleandClaude Opus 5.5 ff0585ad68 feat: add gqlgen Recover that logs panics as one structured record
otelsetup / vulnerabilities (pull_request) Successful in 31s
otelsetup / test (pull_request) Successful in 3m41s
pre-commit / pre-commit (pull_request) Successful in 3m2s
gqlgen's DefaultRecover prints the panic and debug.PrintStack() to stderr, so the log collector stores every stack line as a separate, level-less entry. Recover logs the panic as a single ERROR record via slog.Default() with panic, stack and path attributes, records it on the active span with status Error, and returns the generic "internal system error" without leaking the panic text. Install with srv.SetRecoverFunc(otelsetup.Recover).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6eVuR4Yt3m7TbDTDwyZJi
2026-10-17 01:04:48 +02:00