Add new coordinator metrics for coordinator duty runtimes#10603
Merged
himanshug merged 6 commits intoapache:masterfrom Nov 29, 2020
Merged
Add new coordinator metrics for coordinator duty runtimes#10603himanshug merged 6 commits intoapache:masterfrom
himanshug merged 6 commits intoapache:masterfrom
Conversation
himanshug
reviewed
Nov 25, 2020
| // This duty wanted to cancel the run. No log message, since the duty should have logged a reason. | ||
| return; | ||
| } else { | ||
| params.getCoordinatorStats().addToDutyStat("runtime", duty.getDutyAlias(), TimeUnit.NANOSECONDS.toMillis(end - start)); |
Contributor
There was a problem hiding this comment.
will it be ok to just use "duty.getClass().getName()" for this use case instead of extending the interface?
Contributor
Author
There was a problem hiding this comment.
ya, I realized that would probably have been better after I looked at what I ended up with for alias values
himanshug
approved these changes
Nov 29, 2020
jihoonson
reviewed
Dec 9, 2020
Contributor
jihoonson
left a comment
There was a problem hiding this comment.
@himanshug @capistrant I reviewed this PR as it is labeled as Design Review which requires 3 approvals including one from author himself. The PR LGTM.
4 tasks
JulianJaffePinterest
pushed a commit
to JulianJaffePinterest/druid
that referenced
this pull request
Jan 22, 2021
* Add new coordinator metrics for duty runtimes * fix spelling for a constant variable value * add comment clarifying why the global runtime metric is emitted where it is * Remove duty alias in lieu of using the class name for metrics * fix docs * CoordinatorStats tests + add duty stats to accumulate() logic
This file contains hidden or 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
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.
Description
Adds two new metrics to the coordinator. These metrics help operators evaluate coordinator runtimes and allow for analyzing runtimes for individual duties if the metrics are emitted (as of now, only HistoricalManagementDuties Runnable will emit the individual duty runtime metrics).
coordinator/time= the time for an individual duty to executecoordinator/global/time= the time for the whole duties runnable to executeExample metric json:
coordinator/global/timecoordinator/timeThis PR has:
Key changed/added classes in this PR
CoordinatorStatsDruidCoordinatorCoordinatorDutyInterfaceEmitClusterStatsAndMetrics