Alerting: Recording rules appear as type=recording in Prometheus API + better abstraction for type (#88805)

* Wire status through to prom API

* Regenerate swagger
This commit is contained in:
Alexander Weaver
2024-06-07 11:24:06 -05:00
committed by GitHub
parent b761153812
commit 58fdb24b0b
12 changed files with 65 additions and 134 deletions

View File

@@ -62,7 +62,7 @@ func newRuleFactory(
stopAppliedHook stopAppliedFunc,
) ruleFactoryFunc {
return func(ctx context.Context, rule *ngmodels.AlertRule) Rule {
if rule.IsRecordingRule() {
if rule.Type() == ngmodels.RuleTypeRecording {
return newRecordingRule(
ctx,
maxAttempts,