mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-23 12:44: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
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue