Skip to content

Commit

Permalink
Merge pull request #2413 from cloudflare/joaquim/log-complete-alarm-e…
Browse files Browse the repository at this point in the history
…rrors

Log complete alarm errors in global-scope
  • Loading branch information
jqmmes authored Jul 19, 2024
2 parents 1e3bcf6 + 8753be2 commit 98b7ed1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/workerd/api/global-scope.c++
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ kj::Promise<WorkerInterface::AlarmResult> ServiceWorkerGlobalScope::runAlarm(
&& context.isOutputGateBroken()) {
LOG_NOSENTRY(ERROR, "output lock broke during alarm execution", actorId, e);
} else if (context.isOutputGateBroken()) {
LOG_NOSENTRY(ERROR, "output lock broke during alarm execution without an erro description", actorId);
// We don't usually log these messages, but it's useful to know the real reason we failed
// to correctly investigate stuck alarms.
LOG_NOSENTRY(ERROR, "output lock broke during alarm execution without an interesting error description", actorId, e);
}
return WorkerInterface::AlarmResult {
.retry = true,
Expand Down Expand Up @@ -503,7 +505,9 @@ kj::Promise<WorkerInterface::AlarmResult> ServiceWorkerGlobalScope::runAlarm(
LOG_NOSENTRY(ERROR, "output lock broke after executing alarm", actorId, e);
}
} else {
LOG_NOSENTRY(ERROR, "output lock broke after executing alarm without an error description", actorId);
// We don't usually log these messages, but it's useful to know the real reason we failed
// to correctly investigate stuck alarms.
LOG_NOSENTRY(ERROR, "output lock broke after executing alarm without an interesting error description", actorId, e);
}
return WorkerInterface::AlarmResult {
.retry = true,
Expand Down

0 comments on commit 98b7ed1

Please sign in to comment.