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

Add new metrics and improve robustess #45

Merged
merged 7 commits into from
Jun 24, 2024
Merged

Conversation

Ethnical
Copy link
Collaborator

@Ethnical Ethnical commented Jun 24, 2024

Description
Add new metrics ownerDaysBeforeDeadline & ownerStalePeriod for helping the alerts creation:
Also added a check on the keys values (1 day, 7 days, 14 days):

		if (deadline - now) <= 1*day {
			m.log.Info("deadline is less than 1 day we need to ensure that the owner is doing something in the last 24h otherwise we need to remove it!", "lastLive", lastLive, "owner", owner)
			m.ownerStalePeriod.WithLabelValues(owner.String()).Set(float64(1))
		} else if (deadline - now) <= 7*day {
			m.log.Info("deadline is less than 7 days we need to ensure that the owner is doing something in the last 7 days otherwise we need to remove it!", "lastLive", lastLive, "owner", owner)
			m.ownerStalePeriod.WithLabelValues(owner.String()).Set(float64(7))

		} else if (deadline - now) <= 14*day {
			m.log.Info("deadline is less than 14 days we need to ensure that the owner is doing something in the last 14 days otherwise we need to remove it!", "lastLive", lastLive, "owner", owner)
			m.ownerStalePeriod.WithLabelValues(owner.String()).Set(float64(14))

		} else { //If Owner is not stalling (most of the time) we set the metric to 0 for the owner because he is not stalling.
			m.ownerStalePeriod.WithLabelValues(owner.String()).Set(float64(0))
		}
	}

Improvement of the stdout in for the future in case we starting to use Loki:
1963fdf19f19e2369a288a5e48d102ad59e5e5d67562ce423107da13c407c842

Updated the metrics description (summary) plus new metrics running in realtime. Theses metrics will help us to make the dashboard cleaner and easier.

10fa563906b5fbf65976940ee85924c3411a53655f0468db1b13e0ba81335061

@Ethnical Ethnical requested a review from a team as a code owner June 24, 2024 18:24
@Ethnical Ethnical merged commit fc79b30 into main Jun 24, 2024
4 checks passed
@Ethnical Ethnical deleted the ethni/add-new-metrics branch June 24, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants