track more unexpected panics in metrics

This commit is contained in:
Mechiel Lukkien
2023-09-11 11:43:49 +02:00
parent a5006a9090
commit f6d03a0eab
3 changed files with 7 additions and 2 deletions

View File

@ -363,7 +363,7 @@ func logPanic(ctx context.Context) {
log := xlog.WithContext(ctx)
log.Error("recover from panic", mlog.Field("panic", x))
debug.PrintStack()
metrics.PanicInc("http")
metrics.PanicInc("webadmin")
}
// return IPs we may be listening on.