Skip to content

Commit

Permalink
Add log when host launch threshold exceeded (#1784)
Browse files Browse the repository at this point in the history
In the case where the host takes longer than expected to launch, log the
host id, which can help to track down misconfigured clusters
  • Loading branch information
osoriano authored Feb 24, 2025
1 parent fb499ec commit a245142
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,14 @@ private void processRemovedHosts() {

if (hostTimers.containsKey(hostId)) {
LongTaskTimer.Sample sample = hostTimers.remove(hostId);
if (sample.duration(TimeUnit.MILLISECONDS)
> Duration.ofMinutes(LAUNCH_TIMEOUT_MINUTE).toMillis()) {
double sampleDurationMs = sample.duration(TimeUnit.MILLISECONDS);
if (sampleDurationMs > Duration.ofMinutes(LAUNCH_TIMEOUT_MINUTE).toMillis()) {
// Only consider hosts that have been launched after timeout cutoff
errorBudgetFailure.increment();
LOG.info(
"Host {} launch time ({}ms) exceeded the launch timeout threshold",
hostId,
sampleDurationMs);
} else {
errorBudgetSuccess.increment();
}
Expand Down

0 comments on commit a245142

Please sign in to comment.