Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v11.0.x] Alerting: Fix evaluation metrics to not count retries #86059

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

grafana-delivery-bot[bot]
Copy link
Contributor

Backport ad7f804 from #85873


Changes the following metrics to scope multiple retry attempts as a single occurrence:

  • grafana_alerting_rule_evaluation_duration_seconds
  • grafana_alerting_rule_evaluations_total
  • grafana_alerting_rule_evaluation_failures_total

The benefits are:

  • To have a consistent count of evaluations, irrespective of the number of retries required.
  • To have a count of failures that might need attention. i.e. a successfully retried evaluation is usually not a cause for concern.

The change also adds the following new metrics, which inherit the behavior of the previous metrics.

  • grafana_alerting_rule_evaluation_attempts_total
  • grafana_alerting_rule_evaluation_attempt_failures_total

I've opted not to add a duration for individual attempts, I don't think it's worth the additional cardinality, and the information is available through debug log lines if needed.

Fixes #85847

* Change evaluation metrics to only count once per eval, and add new metrics.

* Cosmetic: Move eval total Inc() to orginal place.

(cherry picked from commit ad7f804)
@stevesg stevesg merged commit 56ea839 into v11.0.x Apr 12, 2024
21 checks passed
@stevesg stevesg deleted the backport-85873-to-v11.0.x branch April 12, 2024 17:49
@fabrizio-grafana fabrizio-grafana modified the milestones: 11.0.x, 11.0.0 May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants