mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
Query Log: add origin of the rules (#6592)
* 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. Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
3885562587
commit
0011bba19b
|
@ -287,6 +287,11 @@ func (g *Group) run(ctx context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx = promql.NewOriginContext(ctx, map[string]string{
|
||||||
|
"groupFile": g.File(),
|
||||||
|
"groupName": g.Name(),
|
||||||
|
})
|
||||||
|
|
||||||
iter := func() {
|
iter := func() {
|
||||||
g.metrics.iterationsScheduled.Inc()
|
g.metrics.iterationsScheduled.Inc()
|
||||||
|
|
||||||
|
@ -612,7 +617,6 @@ func (g *Group) Eval(ctx context.Context, ts time.Time) {
|
||||||
g.staleSeries = nil
|
g.staleSeries = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RestoreForState restores the 'for' state of the alerts
|
// RestoreForState restores the 'for' state of the alerts
|
||||||
|
|
Loading…
Reference in a new issue