Query Log: add origin of the rules
* Query Log: add origin of the rules
We don't set rule name and rule kind because the added value would be
quite low, given we have now the file, the group and the query.
@@ -287,6 +287,11 @@ func (g *Group) run(ctx context.Context) {
return
}
+ ctx = promql.NewOriginContext(ctx, map[string]string{
+ "groupFile": g.File(),
+ "groupName": g.Name(),
+ })
+
iter := func() {
g.metrics.iterationsScheduled.Inc()
@@ -612,7 +617,6 @@ func (g *Group) Eval(ctx context.Context, ts time.Time) {
g.staleSeries = nil
}
}
-
}
// RestoreForState restores the 'for' state of the alerts
