From c7a17f649168ef47caa683cf9c6e243f27379a92 Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Thu, 6 Aug 2020 08:42:20 -0700 Subject: [PATCH] Add additional tag/log to rules Manager Eval trace span. (#7708) Signed-off-by: Callum Styan --- rules/manager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rules/manager.go b/rules/manager.go index c9b7e45d85..9e16611179 100644 --- a/rules/manager.go +++ b/rules/manager.go @@ -576,6 +576,8 @@ func (g *Group) Eval(ctx context.Context, ts time.Time) { if _, ok := err.(promql.ErrQueryCanceled); !ok { level.Warn(g.logger).Log("msg", "Evaluating rule failed", "rule", rule, "err", err) } + sp.SetTag("error", true) + sp.LogKV("error", err) g.metrics.evalFailures.WithLabelValues(groupKey(g.File(), g.Name())).Inc() return }