From f91009aa2ef0721ec41870d7b1ae4c44876801cb Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Thu, 8 Aug 2024 09:11:38 +1000 Subject: [PATCH] promql: clarify error message when panic occurs during query evaluation Signed-off-by: Charles Korn --- promql/engine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/promql/engine.go b/promql/engine.go index 1427302e5..102987d73 100644 --- a/promql/engine.go +++ b/promql/engine.go @@ -1057,7 +1057,7 @@ func (ev *evaluator) recover(expr parser.Expr, ws *annotations.Annotations, errp buf := make([]byte, 64<<10) buf = buf[:runtime.Stack(buf, false)] - level.Error(ev.logger).Log("msg", "runtime panic in parser", "expr", expr.String(), "err", e, "stacktrace", string(buf)) + level.Error(ev.logger).Log("msg", "runtime panic during query evaluation", "expr", expr.String(), "err", e, "stacktrace", string(buf)) *errp = fmt.Errorf("unexpected error: %w", err) case errWithWarnings: *errp = err.err