prometheus/rules
Ogulcan Aydogan d2ecf51d34
rules: delete remaining rule_group metrics on group removal
When a rule group is removed or renamed on reload, Manager.Update deletes
the rule_group-labeled series for most group metrics but missed
GroupLastRuleDurationSum and GroupLastRestoreDuration, which carry the
same rule_group label. Their series leaked on every reload that dropped a
group, growing memory and /metrics cardinality over time.

Delete both alongside the existing cleanup, and extend TestMetricsUpdate
to cover rule_group_last_rule_duration_sum_seconds so the leak is caught.

Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@gmail.com>
2026-07-06 17:59:19 +01:00
..
fixtures Optimise concurrent rule evaluation for rules querying ALERTS and ALERTS_FOR_STATE (#17064) 2025-08-21 16:57:57 +02:00
alerting.go rules: skip template labels when querying ALERTS_FOR_STATE for restore 2026-03-26 15:06:01 +01:00
alerting_test.go rules: add goroutine dump and increase timeout in template test 2026-03-31 17:53:52 +02:00
group.go Remove copyright date from headers (#17785) 2026-01-05 13:46:21 +01:00
group_test.go Remove copyright date from headers (#17785) 2026-01-05 13:46:21 +01:00
manager.go rules: delete remaining rule_group metrics on group removal 2026-07-06 17:59:19 +01:00
manager_test.go rules: delete remaining rule_group metrics on group removal 2026-07-06 17:59:19 +01:00
origin.go Remove copyright date from headers (#17785) 2026-01-05 13:46:21 +01:00
origin_test.go Remove copyright date from headers (#17785) 2026-01-05 13:46:21 +01:00
recording.go Remove copyright date from headers (#17785) 2026-01-05 13:46:21 +01:00
recording_test.go Refactor parse.go into an instance-based Parser interface 2026-02-11 11:21:49 +01:00
rule.go Remove copyright date from headers (#17785) 2026-01-05 13:46:21 +01:00