Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LOG_ERROR_PERIODICALLY() would not log in the first hour after system boot. #626

Merged
merged 1 commit into from
May 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/workerd/util/sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ inline kj::StringPtr maybeOmitColoFromSentry(uint32_t coloId) {
#define LOG_ERROR_PERIODICALLY(...) \
do { \
static kj::TimePoint KJ_UNIQUE_NAME(lastLogged) = \
kj::origin<kj::TimePoint>(); \
kj::origin<kj::TimePoint>() - 1 * kj::HOURS; \
const auto now = kj::systemCoarseMonotonicClock().now(); \
const auto elapsed = now - KJ_UNIQUE_NAME(lastLogged); \
if (KJ_UNLIKELY(elapsed >= 1 * kj::HOURS)) { \
Expand Down