-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Rename nomad.broker.total_blocked
metric
#15835
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulducat
approved these changes
Jan 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems sensible to me, yay for disambiguation!
tgross
added a commit
that referenced
this pull request
Jan 20, 2023
In #15835 we renamed the `nomad.broker.total_blocked` metric to `nomad.broker.total_pending`, but in the process identified that the existing scheduling performance monitoring guide mixed up the `broker.total_blocked` metric with the `blocked_evals.total_blocked` metric. This changeset backports the fix to the docs without renaming the metric (for backwards compatibility).
tgross
added a commit
that referenced
this pull request
Jan 20, 2023
In #15835 we renamed the `nomad.broker.total_blocked` metric to `nomad.broker.total_pending`, but in the process identified that the existing scheduling performance monitoring guide mixed up the `broker.total_blocked` metric with the `blocked_evals.total_blocked` metric. This changeset backports the fix to the docs without renaming the metric (for backwards compatibility).
schmichael
reviewed
Jan 20, 2023
@@ -896,7 +895,7 @@ func (b *EvalBroker) EmitStats(period time.Duration, stopCh <-chan struct{}) { | |||
stats := b.Stats() | |||
metrics.SetGauge([]string{"nomad", "broker", "total_ready"}, float32(stats.TotalReady)) | |||
metrics.SetGauge([]string{"nomad", "broker", "total_unacked"}, float32(stats.TotalUnacked)) | |||
metrics.SetGauge([]string{"nomad", "broker", "total_blocked"}, float32(stats.TotalBlocked)) | |||
metrics.SetGauge([]string{"nomad", "broker", "total_pending"}, float32(stats.TotalPending)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6480 and addresses comments from #14621 (comment)
This changeset fixes a long-standing point of confusion in metrics emitted by the eval broker. The eval broker has a queue of "blocked" evals that are waiting for an in-flight ("unacked") eval of the same job to be completed. But this "blocked" state is not the same as the
blocked
status that we write to raft and expose in the Nomad API to end users. There's a second metricnomad.blocked_eval.total_blocked
that refers to evaluations in that state. This has caused ongoing confusion in major customer incidents and even in our own documentation! (Fixed in this PR.)There's little functional change in this PR aside from the name of the metric emitted, but there's a bit refactoring to clean up the names in
eval_broker.go
so that there aren't name collisions and multiple names for the same state. Changes included are:eval_broker.go
is now named "pending", except for a couple of comments that actually refer to blocked RPCs.nomad.broker.total_blocked
was actually the description fornomad.blocked_eval.total_blocked
.Once this is reviewed I'll open a second PR backporting just the docs fixes.